Project

General

Profile

Actions

Bug #86930

closed

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

Added by Björn Steinbrink over 5 years ago. Updated almost 5 years ago.

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

100%

Estimated time:
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.

Actions #1

Updated by Björn Steinbrink over 5 years ago

  • Description updated (diff)
Actions #2

Updated by Stephan Brun over 5 years ago

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

Actions #3

Updated by Björn Steinbrink over 5 years ago

  • Description updated (diff)
Actions #4

Updated by Stephan Brun over 5 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

Actions #5

Updated by Gerrit Code Review about 5 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

Actions #6

Updated by Gerrit Code Review about 5 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

Actions #7

Updated by Gerrit Code Review about 5 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

Actions #8

Updated by Gerrit Code Review about 5 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

Actions #9

Updated by Gerrit Code Review about 5 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

Actions #10

Updated by Gerrit Code Review about 5 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

Actions #11

Updated by Gerrit Code Review about 5 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

Actions #12

Updated by Gerrit Mohrmann about 5 years ago

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

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF