Bug #86930

ifAuthenticated ViewHelper produces no output on first run after template modification / cache clear

Added by Björn Steinbrink 6 months ago. Updated 15 days ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2018-11-15
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Associated revisions

Revision 3469afec (diff)
Added by Gerrit Mohrmann 4 months ago

[TASK] Update typo3fluid/fluid to 2.6.0

Fixes missing output in ifAuthenticatedViewHelper after cache clearing
and erroneous replication of field properties to subsequent fields.

composer command used:
composer update typo3fluid/fluid

Resolves: #86930
Resolves: #86890
Resolves: #87430
Resolves: #86910
Resolves: #87586
Releases: master, 9.5
Change-Id: I8d1abd0aa08d7d7399ec23675dcf07d08dbdd2f2
Reviewed-on: https://review.typo3.org/59554
Tested-by: TYPO3com <>
Reviewed-by: Jonas Eberle <>
Tested-by: Jonas Eberle <>
Reviewed-by: Oliver Klee <>
Reviewed-by: Andreas Fernandez <>
Reviewed-by: Mona Muzaffar <>
Tested-by: Mona Muzaffar <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

Revision 3ee1346a (diff)
Added by Gerrit Mohrmann 4 months ago

[TASK] Update typo3fluid/fluid to 2.6.0

Fixes missing output in ifAuthenticatedViewHelper after cache clearing
and erroneous replication of field properties to subsequent fields.

composer command used:
composer update typo3fluid/fluid

Resolves: #86930
Resolves: #86890
Resolves: #87430
Resolves: #86910
Resolves: #87586
Releases: master, 9.5
Change-Id: I8d1abd0aa08d7d7399ec23675dcf07d08dbdd2f2
Reviewed-on: https://review.typo3.org/59609
Tested-by: TYPO3com <>
Reviewed-by: Mona Muzaffar <>
Tested-by: Mona Muzaffar <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

History

#1 Updated by Björn Steinbrink 6 months ago

  • Description updated (diff)

#2 Updated by Stephan Brun 6 months ago

I can confirm this bug. First rendering after clearing cache doesn't work as expected.

#3 Updated by Björn Steinbrink 6 months ago

  • Description updated (diff)

#4 Updated by Stephan Brun 6 months 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

#5 Updated by Gerrit Code Review 4 months 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

#6 Updated by Gerrit Code Review 4 months 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

#7 Updated by Gerrit Code Review 4 months 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

#8 Updated by Gerrit Code Review 4 months 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

#9 Updated by Gerrit Code Review 4 months 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

#10 Updated by Gerrit Code Review 4 months 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

#11 Updated by Gerrit Code Review 4 months 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

#12 Updated by Gerrit Mohrmann 4 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#13 Updated by Benni Mack 15 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF