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

Avoid capturing system/context settings in the TV list #8

Open
garryn opened this issue Nov 1, 2023 · 0 comments
Open

Avoid capturing system/context settings in the TV list #8

garryn opened this issue Nov 1, 2023 · 0 comments
Labels

Comments

@garryn
Copy link
Member

garryn commented Nov 1, 2023

Come across an issue where if there is a context or system setting in the Wayfinder tpls then it'll get incorrectly sucked into the tvList array.

This results in PHP warnings being logged (and can be numerous per Wayfinder call) basically along the lines of "Array key does not exist: +my_setting"

To fix this, I amended the regex in the findTemplateVars function in the Wayfinder class to be a bit more specific: ~\[\[\+([^\+]*?)\]\]~

Worked in my use-case but not sure if it needs anything more than that for general inclusion at this time.

@garryn garryn added the bug label Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant