-
Notifications
You must be signed in to change notification settings - Fork 273
Use of parent() is broken in a case of intermediate template in inheritance chain #694
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
Comments
drzraf
pushed a commit
to drzraf/twig.js
that referenced
this issue
Dec 16, 2019
When looking for a block recursively search for grandparents too. Fix twigjs#694
drzraf
pushed a commit
to drzraf/twig.js
that referenced
this issue
Dec 18, 2019
drzraf
pushed a commit
to drzraf/twig.js
that referenced
this issue
Dec 22, 2019
commit 7a4ae6e Author: Raphaël Droz <raphael.droz+floss@gmail.com> Date: Sun Dec 22 00:46:27 2019 -0300 support for "do" tag commit 7658a92 Author: Raphaël Droz <raphael.droz+floss@gmail.com> Date: Sun Dec 22 00:35:23 2019 -0300 The raw filter return a new Markup(content) which may itself return content if content is the empty string. The resulting output is [Object] instead of the expected empty string. commit ec635df Author: Raphaël Droz <raphael.droz+floss@gmail.com> Date: Sat Dec 21 17:20:14 2019 -0300 Avoid attribute() to fail on undefined object commit 001f05c Author: Raphaël Droz <raphael.droz+floss@gmail.com> Date: Sat Dec 21 15:43:01 2019 -0300 Provides sourcemaps commit 8c4d9c2 Author: Raphaël Droz <raphael.droz+floss@gmail.com> Date: Tue Dec 17 21:56:29 2019 -0300 search for block within all ascendants instead of parent only. fix twigjs#694 reroll twigjs#695
drzraf
pushed a commit
to drzraf/twig.js
that referenced
this issue
Dec 22, 2019
commit ae6c641 Author: Raphaël Droz <raphael.droz+floss@gmail.com> Date: Sun Dec 22 00:35:23 2019 -0300 The raw filter returns a new Markup(content) which may itself returns the content if the content is an empty string or undefined. The resulting output is [Object] instead of the (expected) empty string. commit 7a4ae6e Author: Raphaël Droz <raphael.droz+floss@gmail.com> Date: Sun Dec 22 00:46:27 2019 -0300 support for "do" tag commit ec635df Author: Raphaël Droz <raphael.droz+floss@gmail.com> Date: Sat Dec 21 17:20:14 2019 -0300 Avoid attribute() to fail on undefined object commit 001f05c Author: Raphaël Droz <raphael.droz+floss@gmail.com> Date: Sat Dec 21 15:43:01 2019 -0300 Provides sourcemaps commit 8c4d9c2 Author: Raphaël Droz <raphael.droz+floss@gmail.com> Date: Tue Dec 17 21:56:29 2019 -0300 search for block within all ascendants instead of parent only. fix twigjs#694 reroll twigjs#695
drzraf
pushed a commit
to drzraf/twig.js
that referenced
this issue
Dec 22, 2019
commit 867f369 Author: Raphaël Droz <raphael.droz+floss@gmail.com> Date: Sun Dec 22 00:46:27 2019 -0300 support for "do" tag commit ae6c641 Author: Raphaël Droz <raphael.droz+floss@gmail.com> Date: Sun Dec 22 00:35:23 2019 -0300 The raw filter returns a new Markup(content) which may itself returns the content if the content is an empty string or undefined. The resulting output is [Object] instead of the (expected) empty string. commit ec635df Author: Raphaël Droz <raphael.droz+floss@gmail.com> Date: Sat Dec 21 17:20:14 2019 -0300 Avoid attribute() to fail on undefined object commit 001f05c Author: Raphaël Droz <raphael.droz+floss@gmail.com> Date: Sat Dec 21 15:43:01 2019 -0300 Provides sourcemaps commit 8c4d9c2 Author: Raphaël Droz <raphael.droz+floss@gmail.com> Date: Tue Dec 17 21:56:29 2019 -0300 search for block within all ascendants instead of parent only. fix twigjs#694 reroll twigjs#695
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Twig.js v1.14.0 breaks use of
parent()
function in a case if templates inheritance chain includes template that does not have a block that is referenced byparent()
.Here is simplified setup to reproduce issue:
package.json
index.js
a.twig
b.twig
c.twig
I've also published it as a Gist to simplify downloading.
Attempt to rendering this set of templates using twig.js v1.14.0 with
node index.js
produces following error:if version of twig.js is downgraded to 1.13.3 - no error is produced and template renders correctly.
Issue also vanishes in a case if
a.twig
directly extendsc.twig
without intermediate template or in a case ifb.twig
also contains{% block content %}
The text was updated successfully, but these errors were encountered: