Skip to content
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

Rendering a view from within a view resets the global state breaking sections and stacks #6216

Closed
jackwakefield opened this issue Jun 15, 2022 · 0 comments · Fixed by #6193
Closed
Labels

Comments

@jackwakefield
Copy link
Contributor

Bug description

When using the runtime parser, calling View::render from within a view resets the global state, meaning previously declared sections and stacks are cleared resulting in the __literalReplacement placeholders being output, rather than the section or stack content.

How to reproduce

I've created an example repository.

Within home.antlers.html we first yield a section, and then call a custom tag which renders another view containing content for that section.

What I'd expect to be output is Example, but instead what's output is __literalReplacement::_4beaef6a7fa9dff032b08960e26212ea

Logs

No response

Versions

Statamic 3.3.16 Solo
Laravel 9.17.0
PHP 8.1.7
No addons installed

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

runtime (new)

Additional details

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants