Project

General

Profile

Actions

Bug #78414

closed

ControllerContext not available in Condition ViewHelpers

Added by Claus Due about 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-10-25
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
On Location Sprint

Description

Since Fluid standalone became the base of TYPO3 CMS Fluid, the normal and condition ViewHelpers now each have separate classes in CMS which extend from the original class in Fluid. This means that any method CMS overrides in the normal abstract ViewHelper class does not automatically also happen in the abstract condition ViewHelper.

This causes differences between the properties of those ViewHelpers, in the case of this bug report the ControllerContext is not assigned in $this->controllerContext because setRenderingContext is not overridden on AbstractConditionViewHelper like it is on AbstractViewHelper.

TagBasedViewHelper is not affected since it subclasses CMS's standard AbstractViewHelper (and re-implements what the tag based ViewHelper of Fluid does). For anyone interested, the reason why there is this difference is that re-implementing what the AbstractConditionViewHelper does is far more complex than doing the same for AbstractTagBasedViewHelper; the tag variant only needs additional arguments and an internal property, the condition variant requires a number of methods and couplings to template compiler.

The problem in this bug report can be fixed by also implementing setRenderingContext on AbstractConditionViewHelper.

Actions

Also available in: Atom PDF