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

Recursive template extending does not work with placeholders #6563

Open
stefanw opened this Issue Nov 22, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@stefanw
Contributor

stefanw commented Nov 22, 2018

Summary

Recursive template extending does not work in Django CMS, but works in Django itself.

Expected behaviour

The following template setup with template_name.html twice (once in template dir and once in app templates) should render (as it does in Django since Django 1.9).

# templates/template_name.html
{% extends "template_name.html" %}

# app/templates/template_name.html
{% extends "base.html" %}

# templates/base.html
{% placeholder ... %}

Actual behaviour

A Exception RuntimeError: 'maximum recursion depth exceeded' error is raised, because the context for the extends node in cms/placeholder/utils.py does not contain a proper template origin thus the resolution mechanism cannot skip the current template.

PR is #6564.

Environment

  • Python version: 3.6
  • Django version: 1.11
  • django CMS version: 3.5.3

@stefanw stefanw referenced this issue Nov 22, 2018

Open

Allow recursive extend in rendering #6564

0 of 11 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment