Skip to content

[BUGFIX] Ensure consistent handling of multiple f:else#1026

Merged
s2b merged 1 commit intomainfrom
bugfix/multipleElseUncached
Feb 11, 2025
Merged

[BUGFIX] Ensure consistent handling of multiple f:else#1026
s2b merged 1 commit intomainfrom
bugfix/multipleElseUncached

Conversation

@s2b
Copy link
Copy Markdown
Contributor

@s2b s2b commented Feb 2, 2025

If a f:if ViewHelper contains multiple f:else ViewHelpers, cached templates chose the first else node, while uncached templates chose the last one. This patch restores consistent behavior by adjusting the code for uncached templates.

This can be validated by temporarily commenting out the second test execution code in IfThenElseViewHelperTest::render(). This testing setup issue should also be fixed in the future, but this is out of scope for the specific issue. A follow-up patch will fix a similar issue.

If a f:if ViewHelper contains multiple f:else ViewHelpers, cached templates
chose the first else node, while uncached templates chose the last one.
This patch restores consistent behavior by adjusting the code for uncached
templates.

This can be validated by temporarily commenting out the second test
execution code in IfThenElseViewHelperTest::render(). This testing setup
issue should also be fixed in the future, but this is out of scope for the
specific issue. A follow-up patch will fix a similar issue.
@s2b s2b merged commit 87e9c0a into main Feb 11, 2025
@s2b s2b deleted the bugfix/multipleElseUncached branch February 11, 2025 15:37
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.

2 participants