Bug #86930
closedifAuthenticated ViewHelper produces no output on first run after template modification / cache clear
100%
Description
When using an ifAuthenticated ViewHelper, the contents of the view helper are missing the first time the template is rendered. If you reload the page while logged in in the backend (maybe only when logged in with admin privileges), the view helper works from the second time. onward. But if the reload happens as an ordinary frontend user, the content will stay missing.
The base class TYPO3Fluid\Fluid\Core\ViewHelper\AbstractConditionViewHelper
of this view helper says to implement render()
in derived classes, and, for example, the IfViewHelper
does this. Adding a straightforward implementation of render()
seems to fix the problem, with render()
only being called on the first rendering, so it seems like render()
is used just once when the View Helper has not been compiled yet? I'm not really familiar with how view helper compilation works, so this is just guess work.
Updated by Stephan Brun about 6 years ago
I can confirm this bug. First rendering after clearing cache doesn't work as expected.
Updated by Stephan Brun about 6 years ago
This behaviour is fixed, with the actual master from typo3fluid/fluid (https://github.com/TYPO3/Fluid/)
The commit "[FEATURE] Deprecate evaluateCondition() in favor of verdict() (#393)" (https://github.com/TYPO3/Fluid/commit/a67b31f9e6ecb015d0f47892fce46cf64110fd15) fix it.
It was commited two days after the last release v2.5.4 in July. So once v2.5.5 is released and integrated in TYPO3 this bug is obsolete.
I think it got broken by this commit: https://github.com/TYPO3/TYPO3.CMS/commit/c2f3876bae316de368ccedb9ddce1a71ce0c3dbd#diff-3597d724b9aa3007c8c3b862631aa78a
Updated by Gerrit Code Review about 6 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59554
Updated by Gerrit Code Review almost 6 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59554
Updated by Gerrit Code Review almost 6 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59554
Updated by Gerrit Code Review almost 6 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59554
Updated by Gerrit Code Review almost 6 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59554
Updated by Gerrit Code Review almost 6 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59554
Updated by Gerrit Code Review almost 6 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59609
Updated by Gerrit Mohrmann almost 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 3469afec25bf599e7c5782a5ac6f4d71ffcf946d.