New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

page_attribute "field-name" page_lookup as varname fails silently #5930

Closed
jrief opened this Issue Apr 13, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@jrief
Copy link
Contributor

jrief commented Apr 13, 2017

Summary

when using the templatetag

{% page_attribute "field-name" page_lookup as varname %}

using a page_lookup of a CMS page which does not exist, this templatetag fails silently, without rendering any part of the template. This makes is very hard to track down the reason.

Expected behaviour

just as

{% page_url page_lookup as varname %}

can be used on a CMS page which does not exist, hence setting varname to None, one would expect the same behaviour for the templatetag page_attribute.

Environment

  • Python version: any
  • Django version: 1.10
  • django CMS version: 3.4.2, HEAD of releases/3.4.x

jrief added a commit to jrief/django-shop that referenced this issue Apr 13, 2017

hard code tooltip context variable
until divio/django-cms#5930 is fixed, we can not use
templatetag ``{% page_attribute 'menu_title' 'shop-cart' as tooltip %}``.
Instead we must hard code the `tooltip` context variable, otherwise the cart-icon.html
fragment fails silently if the cart page does not exist.
@czpython

This comment has been minimized.

Copy link
Contributor

czpython commented May 22, 2017

Hello @jrief,
I'm unable to reproduce this.
Can you provide me with a test project where I can do so?
If I understand the issue correctly, when the resolver fails, it prevents the rest of the template from rendering?

@czpython

This comment has been minimized.

Copy link
Contributor

czpython commented May 22, 2017

/cc @nnja

@czpython

This comment has been minimized.

Copy link
Contributor

czpython commented Jul 17, 2017

Closing as we're unable to reproduce this.

@czpython czpython closed this Jul 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment