show_placeholder_by_id should fail silently (like it always did) #422

Closed
kevinrenskers opened this Issue Apr 9, 2010 · 6 comments

2 participants

@kevinrenskers

In the latest source I've just checked out, the show_placeholder_by_id function has changed, so when you try to show something not already created, you now get an error. It always used to fail silently, with an email being sent to the managers.

TemplateSyntaxError at /
Caught DoesNotExist while rendering: Page matching query does not exist.

{% show_placeholder_by_id "description" "product1" %}

@kevinrenskers

No, I still get the same error. I think because the page "product1" doesn't exist, the query can't find the plugin on that non-existing page.

@ojii

do you have DEBUG = True? If yes, it is supposed to fail loud.

@kevinrenskers

With DEBUG = False, I get this error:

File "packages/cms/templatetags/cms_tags.py", line 287, in _show_placeholder_by_id
{'reverse_id':reverse_id, 'host':request.host, 'path':request.path},

AttributeError: 'WSGIRequest' object has no attribute 'host'

@kevinrenskers

Also, I have a request. Would it be possible to make it configurable if it should fail silently or not? When I am creating HTML templates, I know that somewhere there should be a link to a privacy page, a placeholder from another page should be shown, etc. However, I am not going to create those pages while I am still working on the HTML templates themselves.

In this current setup, I would either get a LOT of emails I don't want or need, or I get errors on screen, making my work impossible to do.

@ojii

is this still an issue? The make it configurable would be another ticket and a feature request, but the page not found should not raise an exception unless DEBUG is True

@ojii ojii closed this Jun 10, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment