Skip to content

[5.x] Fix issues with Blade nav tag compiler #11872

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

Merged
merged 1 commit into from
Jun 19, 2025

Conversation

JohnathonKoster
Copy link
Contributor

This PR fixes #11806.

Problem

The current implementation of the nav compiler will create a temporary file and include that behind the scenes, which worked in supporting recursive children. However, this causes issues when importing classes or functions, as this information would be lost inside the hidden temporary file.

Additionally, because the current implementation triggers a Blade compilating in creating that temporary file, it can mess with the internal raw block state, causing placeholder strings like @__raw_block_1__@ to appear in the output.

The Fix

This PR addresses both issues by refactoring away the temporary file, and instead inlines the compiled navigation code in a function. Recursive navigation support is maintained by simply calling that compiled function instead of including a hidden view.

@jasonvarga jasonvarga merged commit 3457747 into statamic:5.x Jun 19, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Edge case when using blade view helpers within antler blade component default slot
2 participants