Skip to content
Snippets Groups Projects
Commit 003c6628 authored by Marc Bastian Heinrichs's avatar Marc Bastian Heinrichs Committed by Oliver Hader
Browse files

[BUGFIX] Alternative implementations for view helpers do not work

Extbase allows to register alternative implementations for
objects. However that does not work for view helpers using
a closing tag. The resolved (alternative) object is compared
to the name of the original view helper and throws an
exception like:

  #1224485398: Templating tags not properly nested. Expected:
  "AlternativeViewHelper"; Actual: "OriginalViewHelper"

A simple solution is to save the class name of the object returned
from the object manager in a runtime cache and check this when
resolving a view helper name. A nice side effect is, that a same
view helper name must not be calculated over and over again.

Fixes: #52272
Releases: 6.0, 6.1, 6.2
Change-Id: Ie49e5e83c779b4748dc2059f8fbc85552ce4b406
Reviewed-on: https://review.typo3.org/30349
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
parent 94f1e325
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment