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
After the recent improvements to the {{ nocache }} tag in #8956, the variables used in custom PHP code or custom tags inside the {{ nocache }} tag content are available.
This is happening because Antlers now attempts to extract the relevant variables from the {{ nocache }} tag's contents. This extraction is bypassed if partials are being called inside the tag or if the Regex parser is being used.
We should probably also bypass this extraction logic when using custom PHP code (unless we can extract them too?) or using custom tags.
Bug description
After the recent improvements to the
{{ nocache }}
tag in #8956, the variables used in custom PHP code or custom tags inside the{{ nocache }}
tag content are available.This is happening because Antlers now attempts to extract the relevant variables from the
{{ nocache }}
tag's contents. This extraction is bypassed if partials are being called inside the tag or if the Regex parser is being used.We should probably also bypass this extraction logic when using custom PHP code (unless we can extract them too?) or using custom tags.
How to reproduce
PHP code
Original: #9001 (comment)
The
plan_type
variable is notTags
Original: #8956 (comment)
Workaround
This issue can be easily worked around by specifying the variables that should be cached using the
select
parameter on the{{ nocache }}
tag:Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Antlers Parser
runtime (new)
Additional details
No response
The text was updated successfully, but these errors were encountered: