Skip to content

Commit

Permalink
Fixed bug where empty placeholder would render as 'None'
Browse files Browse the repository at this point in the history
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 committed Oct 20, 2016
1 parent 2949e3f commit ce20d36
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 ce20d36

Please sign in to comment.