Closed rfleschenberg closed 7 years ago
Traceback below.
Can we just catch the exception and return None? That seems to work for me, but I don't know the contract of that method.
None
Environment: Request Method: GET Request URL: http://localhost:8000/de/ Django Version: 1.10.5 Python Version: 2.7.9 Installed Applications: (u'django.contrib.auth', u'email_auth', u'polymorphic', u'django.contrib.contenttypes', u'django.contrib.sessions', u'django.contrib.sites', u'django.contrib.admin', u'django.contrib.staticfiles', u'django.contrib.sitemaps', u'djangocms_text_ckeditor', u'django_select2', u'widget_tweaks', u'cmsplugin_cascade', u'cmsplugin_cascade.clipboard', u'cmsplugin_cascade.sharable', u'cmsplugin_cascade.extra_fields', u'cmsplugin_cascade.segmentation', u'cmsplugin_contact', u'cms_bootstrap3', u'adminsortable2', u'rest_framework', u'rest_framework.authtoken', u'rest_auth', u'fsm_admin', u'djng', u'cms', u'menus', u'treebeard', u'compressor', u'sekizai', u'sass_processor', u'django_filters', u'filer', u'easy_thumbnails', u'easy_thumbnails.optimize', u'parler', u'post_office', u'multiselectfield', u'phonenumber_field', u'haystack', u'clear_cache', u'shop_stripe', u'shop_paypal', u'shop', u'stofferia', u'yet_another_django_profiler') Installed Middleware: [u'django.middleware.cache.UpdateCacheMiddleware', u'djng.middleware.AngularUrlMiddleware', u'django.middleware.gzip.GZipMiddleware', u'django.contrib.sessions.middleware.SessionMiddleware', u'django.middleware.csrf.CsrfViewMiddleware', u'django.contrib.auth.middleware.AuthenticationMiddleware', u'shop.middleware.CustomerMiddleware', u'django.contrib.messages.middleware.MessageMiddleware', u'django.middleware.locale.LocaleMiddleware', u'django.middleware.common.CommonMiddleware', u'cms.middleware.language.LanguageCookieMiddleware', u'cms.middleware.user.CurrentUserMiddleware', u'cms.middleware.page.CurrentPageMiddleware', u'cms.middleware.toolbar.ToolbarMiddleware', u'cmsplugin_contact.middleware.ForceResponseMiddleware', u'django.middleware.cache.FetchFromCacheMiddleware', u'yet_another_django_profiler.middleware.ProfilerMiddleware'] Template error: In template /home/rene/stofferia-shop/stofferia/templates/stofferia/pages/home.html, error at line 12 CascadeElement matching query does not exist. 2 : {% load cms_tags i18n %} 3 : 4 : {% block hero_image %}<div class="hidden-xs hidden-sm hidden-md">{% placeholder "Hero Image" %}</div>{% endblock %} 5 : 6 : {% block special_offer_tabs %} 7 : <div id="special-offer-tabs-outer" class="hidden-sm hidden-xs hidden-md"> 8 : <div class="container"> 9 : <div class="row"> 10 : <div class="col-xs-12"> 11 : <ul class="nav nav-tabs"> 12 : <li c lass="active"><a data-toggle="tab " href="#new_products">{% trans 'New products' %}</a></li> 13 : <li><a data-toggle="tab" href="#special_offers">{% trans 'Special offers' %}</a></li> 14 : <li><a data-toggle="tab" href="#seasonal_products">{% trans 'Seasonal products' %}</a></li> 15 : </ul> 16 : <div class="tab-content"> 17 : <div id="new_products" class="tab-pane fade in active"> 18 : {% placeholder "New Products" %} 19 : </div> 20 : <div id="seasonal_products" class="tab-pane fade"> 21 : {% placeholder "Seasonal Products" %} 22 : </div> Traceback: File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner 39. response = get_response(request) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _legacy_get_response 249. response = self._get_response(request) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response 217. response = self.process_exception_by_middleware(e, request) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response 215. response = response.render() File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/response.py" in render 109. self.content = self.rendered_content File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/response.py" in rendered_content 86. content = template.render(context, self._request) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/backends/django.py" in render 66. return self.template.render(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/base.py" in render 208. return self._render(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/test/utils.py" in instrumented_test_render 94. return self.nodelist.render(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/base.py" in render 994. bit = node.render_annotated(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/base.py" in render_annotated 961. return self.render(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render 174. return compiled_parent._render(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/test/utils.py" in instrumented_test_render 94. return self.nodelist.render(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/base.py" in render 994. bit = node.render_annotated(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/base.py" in render_annotated 961. return self.render(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render 174. return compiled_parent._render(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/test/utils.py" in instrumented_test_render 94. return self.nodelist.render(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/base.py" in render 994. bit = node.render_annotated(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/base.py" in render_annotated 961. return self.render(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/classytags/core.py" in render 146. return self.render_tag(context, **kwargs) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/sekizai/templatetags/sekizai_tags.py" in render_tag 83. rendered_contents = nodelist.render(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/base.py" in render 994. bit = node.render_annotated(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/base.py" in render_annotated 961. return self.render(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/classytags/core.py" in render 146. return self.render_tag(context, **kwargs) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/sekizai/templatetags/sekizai_tags.py" in render_tag 83. rendered_contents = nodelist.render(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/base.py" in render 994. bit = node.render_annotated(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/base.py" in render_annotated 961. return self.render(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/classytags/core.py" in render 146. return self.render_tag(context, **kwargs) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/cms/templatetags/cms_tags.py" in render_tag 487. rendered_contents = nodelist.render(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/base.py" in render 994. bit = node.render_annotated(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/base.py" in render_annotated 961. return self.render(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render 70. result = block.nodelist.render(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/base.py" in render 994. bit = node.render_annotated(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/template/base.py" in render_annotated 961. return self.render(context) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/classytags/core.py" in render 146. return self.render_tag(context, **kwargs) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/cms/templatetags/cms_tags.py" in render_tag 220. nodelist=nodelist, File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/cms/plugin_rendering.py" in render_page_placeholder 266. nodelist=nodelist, File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/cms/plugin_rendering.py" in _render_page_placeholder 499. nodelist=nodelist, File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/cms/plugin_rendering.py" in render_placeholder 205. placeholder_content = ''.join(plugin_content) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/cms/plugin_rendering.py" in render_plugins 432. yield self.render_plugin(plugin, context, placeholder, editable) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/cms/plugin_rendering.py" in render_plugin 358. content=content, File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/cmsplugin_cascade/apps.py" in render_editable_plugin 188. instance=instance, File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/cmsplugin_cascade/plugin_base.py" in get_parent_classes 197. instance = instance.get_parent_instance() File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/cmsplugin_cascade/models.py" in get_parent_instance 74. return CascadeElement.objects.get(pk=self.parent_id) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/db/models/manager.py" in manager_method 85. return getattr(self.get_queryset(), name)(*args, **kwargs) File "/home/rene/.virtualenvs/stofferia/local/lib/python2.7/site-packages/django/db/models/query.py" in get 385. self.model._meta.object_name Exception Type: DoesNotExist at /de/ Exception Value: CascadeElement matching query does not exist.
This has been fixed in 0.12. Reopen otherwise.
Traceback below.
Can we just catch the exception and return
None
? That seems to work for me, but I don't know the contract of that method.