question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

extends, defined block multiple time

See original GitHub issue

file1.html

{% block test %}
  file1
{% endblock %}

file2.html

{% extends "file1.html" %}
{% if true %}
  {% block test %}
    file2 block1
  {% endblock %}
{% else %}
  {% block test %}
    file2 block2
  {% endblock %}
{% endblock %}

expected: file2 block 1 actual: file2 block 2

the precompiled js-file for file2.html contains the function for the test-block twice with the same name so the last defined instance of the block get called regardless of what case the if falls into.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:18 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
pocesarcommented, Mar 24, 2016

this now throws but doesn’t implement self, makes it impossible to render the same block two times (and used to work)

2reactions
ronnixcommented, Mar 30, 2016

Same problem, I used this to render a block twice, and now it breaks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

extends
You can't define multiple block tags with the same name in the same template. This limitation exists because a block tag works in...
Read more >
The scope of names defined in class block doesn't extend to ...
If the definition occurs in a function block, the scope extends to any blocks contained within the defining one, unless a contained block...
Read more >
Reusing code with extends | Looker - Google Cloud
Extending more than one object at the same time ... The extension process works exactly as described in the implementation example, but there...
Read more >
Catching Multiple Exception Types and Rethrowing ...
In Java SE 7 and later, a single catch block can handle more than one type of exception. ... static class FirstException extends...
Read more >
RFC 3611 - RTP Control Protocol Extended Reports (RTCP XR)
Section 4 defines several specific report block types. ... An RTP data sender that receives a Receiver Reference Time Report Block can respond...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found