[BUGFIX] Alternative implementations for view helpers do not work 57/24057/8
authorMarc Bastian Heinrichs <typo3@mbh-software.de>
Sat, 15 Feb 2014 10:29:55 +0000 (11:29 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Fri, 23 May 2014 08:12:08 +0000 (10:12 +0200)
commit03bf947c3716e37c75f74bece22bcc4f8cfb1972
tree9a63afd335fb04437ed1cf368491c4aacfaa74db
parent68751f6035645566f41bd9f17bffd109531c3ee7
[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/24057
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
typo3/sysext/fluid/Classes/Core/Parser/TemplateParser.php