Skip to content

Commit

Permalink
Fixed bug where empty placeholder would render as 'None' (django-cms#…
Browse files Browse the repository at this point in the history
…5734)

This bug would appear when "placeholder" template tag appeared in a
template being rendered by a non-CMS view.

The render_page_placeholder function had a bare "return" instead of
returning an explicit empty string.

See also the code that would be executed for the same case in
django-cms 3.3.x (in cms_tags.py:render_tag in that release):

        page = request.current_page
        if not page or page == 'dummy':
            if nodelist:
                return nodelist.render(context)
            return ''
  • Loading branch information
cworth-gh authored and othane committed Dec 15, 2016
1 parent 777e66f commit 7f8431c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cms/plugin_rendering.py
Expand Up @@ -254,7 +254,7 @@ def render_page_placeholder(self, slot, context, inherit, nodelist=None):
current_page = self.current_page

if not current_page:
return
return ''

content = self._render_page_placeholder(
context=context,
Expand Down

0 comments on commit 7f8431c

Please sign in to comment.