Page with non-existent main language version does not work properly
See original GitHub issueWhen clicking “view on site” for pages with non-existing main configuration, error is raised:
Reverse for 'pages-details-by-slug' with arguments '()' and keyword arguments '{'slug': ''}' not found. 2 pattern(s) tried: [u'de/(?P<slug>[0-9A-Za-z-_.//]+)/$', u'de/(?P<slug>[0-9A-Za-z-_.//]+)/$']
Full traceback:
Environment:
Request Method: GET
Request URL: http://localhost:8000/en-gb/spanish-test/?edit&language=en-gb
Django Version: 1.8.9
Python Version: 2.7.11
Installed Applications:
('djangocms_admin_style',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.admin',
'django.contrib.sites',
'django.contrib.gis',
'django.contrib.sitemaps',
'django.contrib.staticfiles',
'django.contrib.messages',
'raven.contrib.django.raven_compat',
'storages',
'cnk_custom_user',
'cms',
'menus',
'sekizai',
'treebeard',
'djangocms_text_ckeditor',
'djangocms_style',
'djangocms_column',
'filer',
'robots',
'django_user_agents',
'easy_thumbnails',
'cnk_ft1_cms.custom_app_names.CMSPluginFilerImageAppconfig',
'cmsplugin_filer_file',
'cmsplugin_filer_folder',
'cmsplugin_filer_teaser',
'cmsplugin_filer_utils',
'cmsplugin_filer_video',
'cnk_plugins_blocks',
'cnk_djangocms_landingpages',
'cnk_djangocms_resources',
'cnk_world_regions',
'djangocms_inherit',
'djangocms_link',
'aldryn_redirects',
'aldryn_segmentation',
'country_segment',
'probabilistic_segment',
'aldryn_apphooks_config',
'parler',
'taggit',
'taggit_autosuggest',
'meta',
'meta_mixin',
'djangocms_blog',
'djangocms_page_meta',
'djangocms_youtube',
'cnk_ft158_cmsplugins',
'cmsdraftpreview',
'cnk_ft1_cms',
'debug_toolbar')
Installed Middleware:
['debug_toolbar.middleware.DebugToolbarMiddleware',
'django.middleware.cache.UpdateCacheMiddleware',
'cms.middleware.utils.ApphookReloadMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'cms.middleware.user.CurrentUserMiddleware',
'cms.middleware.page.CurrentPageMiddleware',
'cms.middleware.toolbar.ToolbarMiddleware',
'cms.middleware.language.LanguageCookieMiddleware',
'aldryn_redirects.middleware.RedirectFallbackMiddleware',
'country_segment.middleware.ResolveCountryCodeMiddleware',
'django_user_agents.middleware.UserAgentMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware']
Template error:
In template /Volumes/CerneCuneExt/cloud/Dropbox (Personal)/work/repos/ft1_28_corporate_cms/cnk_ft1_cms/cnk_ft1_cms/templates/base.html, error at line 62
Reverse for 'pages-details-by-slug' with arguments '()' and keyword arguments '{'slug': ''}' not found. 2 pattern(s) tried: [u'de/(?P<slug>[0-9A-Za-z-_.//]+)/$', u'de/(?P<slug>[0-9A-Za-z-_.//]+)/$']
52 : (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
53 : m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
54 : })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
55 : ga('create', 'UA-68835568-7', 'auto');
56 : ga('send', 'pageview');
57 : </script>
58 : {% endif %}
59 : </head>
60 : <body>
61 :
62 : {% cms_toolbar %}
63 :
Traceback:
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
164. response = response.render()
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/django/template/response.py" in render
158. self.content = self.rendered_content
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/django/template/response.py" in rendered_content
135. content = template.render(context, self._request)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/django/template/backends/django.py" in render
74. return self.template.render(context)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/django/template/base.py" in render
210. return self._render(context)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/django/test/utils.py" in instrumented_test_render
96. return self.nodelist.render(context)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/django/template/base.py" in render
905. bit = self.render_node(node, context)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/django/template/debug.py" in render_node
79. return node.render(context)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/django/template/loader_tags.py" in render
135. return compiled_parent._render(context)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/django/test/utils.py" in instrumented_test_render
96. return self.nodelist.render(context)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/django/template/base.py" in render
905. bit = self.render_node(node, context)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/django/template/debug.py" in render_node
79. return node.render(context)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/classytags/core.py" in render
146. return self.render_tag(context, **kwargs)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/sekizai/templatetags/sekizai_tags.py" in render_tag
83. rendered_contents = nodelist.render(context)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/django/template/base.py" in render
905. bit = self.render_node(node, context)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/django/template/debug.py" in render_node
79. return node.render(context)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/classytags/core.py" in render
146. return self.render_tag(context, **kwargs)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/sekizai/templatetags/sekizai_tags.py" in render_tag
83. rendered_contents = nodelist.render(context)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/django/template/base.py" in render
905. bit = self.render_node(node, context)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/django/template/debug.py" in render_node
79. return node.render(context)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/classytags/core.py" in render
146. return self.render_tag(context, **kwargs)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/sekizai/templatetags/sekizai_tags.py" in render_tag
83. rendered_contents = nodelist.render(context)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/django/template/base.py" in render
905. bit = self.render_node(node, context)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/django/template/debug.py" in render_node
79. return node.render(context)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/classytags/core.py" in render
146. return self.render_tag(context, **kwargs)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/cms/templatetags/cms_tags.py" in render_tag
663. toolbar.populate()
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/cms/toolbar/toolbar.py" in populate
302. self._call_toolbar('populate')
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/cms/toolbar/toolbar.py" in _call_toolbar
351. result = getattr(toolbar, func_name)()
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/cms/cms_toolbars.py" in populate
139. self.add_language_menu()
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/cms/cms_toolbars.py" in add_language_menu
228. url = DefaultLanguageChanger(self.request)(code)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/menus/utils.py" in __call__
137. return '%s%s' % (self.get_page_path(lang), self.app_path)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/menus/utils.py" in get_page_path
107. return page.get_absolute_url(language=lang, fallback=True)
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/cms/models/pagemodel.py" in get_absolute_url
160. return reverse('pages-details-by-slug', kwargs={"slug": path})
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/django/core/urlresolvers.py" in reverse
578. return force_text(iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs)))
File "/Users/petr/virtualenvs/ft1_28_corporate_cms/lib/python2.7/site-packages/django/core/urlresolvers.py" in _reverse_with_prefix
495. (lookup_view_s, args, kwargs, len(patterns), patterns))
Exception Type: NoReverseMatch at /en-gb/spanish-test/
Exception Value: Reverse for 'pages-details-by-slug' with arguments '()' and keyword arguments '{'slug': ''}' not found. 2 pattern(s) tried: [u'de/(?P<slug>[0-9A-Za-z-_.//]+)/$', u'de/(?P<slug>[0-9A-Za-z-_.//]+)/$']
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Troubleshoot known issues - .NET MAUI - Microsoft Learn
Describes the known issues and troubleshooting you can do to resolve these issues for a .NET Multi-platform App UI (.NET MAUI) app.
Read more >React-router URLs don't work when refreshing or writing ...
Now routing works correctly and I can refresh the page or type in the URL directly. There isn't any need to worry about...
Read more >Change master language of page and blocks - Optimizely World
I am using Language Manager tool for replacing content from Svenska to Finnish. But the problem is all the pages and blocks imported...
Read more >Troubleshoot Terminal launch failures - Visual Studio Code
If your shell is installed separate from your platform, try installing the latest available version of the shell. The same advice applies if...
Read more >Help:Interlanguage links - Wikipedia
Interlanguage links are links from a page in one Wikipedia language to an ... These links can appear as links in the "Languages"...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@FinalAngel - is this bug now acknowledged / planned to be fixed?
Yep!