You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In antlers, with partials including partials, the frontmatter nested variables leak to the parent on the second include of the same partial. Or is this not a leak, and is this the expected behavior?
How to reproduce
In a new statamic project add these 3 antlers files:
In the browser visit the url that renders the template file resources/views/home.antlers.html.
This will be the rendered view:
In the template file _home.antlers.html, it seems that the first occurrence of the partial {{ partial:partial_b /}} removes the view variables on each nested partial exit. However in the second occurrence of the partial {{ partial:partial_b /}} the view variable var_partial_a is still present in the nested partial view.
When we returned to the template file, all view variables were correctly removed.
However (not shown in the case above) but in the layout file that contains the template, both variables are present again var_partial_a and var_partial_b.
Bug description
In antlers, with partials including partials, the frontmatter nested variables leak to the parent on the second include of the same partial. Or is this not a leak, and is this the expected behavior?
How to reproduce
In a new statamic project add these 3 antlers files:
resources/views/_partial_a.antlers.html
resources/views/_partial_b.antlers.html
resources/views/home.antlers.html
In the browser visit the url that renders the template file
resources/views/home.antlers.html
.This will be the rendered view:
In the template file
_home.antlers.html
, it seems that the first occurrence of the partial{{ partial:partial_b /}}
removes the view variables on each nested partial exit. However in the second occurrence of the partial{{ partial:partial_b /}}
the view variablevar_partial_a
is still present in the nested partial view.When we returned to the template file, all view variables were correctly removed.
However (not shown in the case above) but in the layout file that contains the template, both variables are present again
var_partial_a
andvar_partial_b
.Logs
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
The text was updated successfully, but these errors were encountered: