Review main Merged

24057[BUGFIX] Alternative implementations for view helpers do not work

Oliver Hader CR +2 V +2 Easy +21 −8 updated 05/23/14, 08:12

Commit message

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.

Review

  • Code review CR +2
    • Oliver Hader +2
    • Markus Klein +1
  • Verified V +2
    • Oliver Hader +2
    • Markus Klein +1

Files 1

Review log 32

Show 7 earlier messages
  1. Mr. Jenkins commented on patch set 1 09/25/13, 16:04

  2. Mr. Jenkins commented on patch set 1 09/25/13, 18:03

  3. Mr. Jenkins commented on patch set 1 09/25/13, 18:16

  4. Christian Kuhn commented on patch set 1 09/26/13, 20:51

    ? Sry I don't get it.
  5. Markus Klein uploaded patch set 2 09/26/13, 22:25

  6. Mr. Jenkins commented on patch set 2 09/26/13, 22:41

  7. Oliver Hader uploaded patch set 3 09/27/13, 08:33

  1. Oliver Hader commented on patch set 3 09/27/13, 08:33

    I've added a description to http://forge.typo3.org/issues/52272#note-3 and extended the unit-tests...
  2. Mr. Jenkins commented on patch set 3 09/27/13, 08:43

  3. Marc Bastian Heinrichs wrote 10/21/13, 18:19

    Topic set to "fluid".
  4. Markus Klein rebased onto patch set 3 01/16/14, 22:10

  5. Markus Klein voted on patch set 4 CR +1 01/16/14, 22:12

  6. Mr. Jenkins commented on patch set 4 01/16/14, 22:31

  7. Wouter Wolters commented on patch set 4 CR -1 02/05/14, 16:43

    Working on an update

    TemplateParserTest.php:472

    Fatal error on this line.

    TemplateParserTest.php:497

    fatal error on this line
  8. Wouter Wolters uploaded patch set 5 02/05/14, 16:49

  9. Wouter Wolters commented on patch set 5 V +1 CR +1 02/05/14, 16:53

    Verified is based on the unit-tests
  10. Marc Bastian Heinrichs commented on patch set 5 02/05/14, 17:00

    Won't it be possible to do the following in initializeViewHelperAndAddItToStack to save the additional objectmanager->get()? Add the resolved view helper name mapping to the class name of the object returned from object manager to a additonal stack, which could be compared in closingViewHelperTagHandler.
  11. Mr. Jenkins commented on patch set 5 02/05/14, 17:45

  12. Markus Klein commented on patch set 5 CR +1 02/11/14, 23:57

    @MaBa I'm not sure what you mean exactly, but could you provide such a solution. Saving an obejectmanager call is definitely worth looking for some other solutino.
  13. Marc Bastian Heinrichs uploaded patch set 6 02/15/14, 10:30

  14. Marc Bastian Heinrichs commented on patch set 6 02/15/14, 10:33

    Here is my proposal. No test until now. Perhaps anybody has an idea how to nicely test this.
  15. Mr. Jenkins commented on patch set 6 02/15/14, 10:45

  16. Markus Klein commented on patch set 6 02/15/14, 17:54

    At first glance this looks promising, but I've to look at it again.

    TemplateParser.php:273

    Holy sh**. one needs to study English for reading this name... ;-)
  17. Markus Klein voted on patch set 6 V +1 CR +1 03/18/14, 13:09

  18. Stefan Neufeind commented on patch set 6 03/21/14, 23:00

    viewhelpers (one word) afaik - here and below does => do
  19. Markus Klein commented on patch set 6 03/26/14, 21:00

    Reply

    Done
  20. Markus Klein updated the commit message in patch set 6 03/26/14, 21:00

  21. Markus Klein voted on patch set 7 V +1 CR +1 03/26/14, 21:01

  22. Mr. Jenkins commented on patch set 7 03/26/14, 21:13

  23. Oliver Hader commented on patch set 7 V +2 CR +2 05/23/14, 08:12

    Perfect, looks much better now compared to my initial approach. Tested in 6.2 and 6.1 - 6.0 will follow
  24. Oliver Hader merged patch set 8 05/23/14, 08:12

  25. Oliver Hader commented on patch set 8 05/23/14, 08:12

    Cherry Picked This patchset was cherry picked to change: Ie49e5e83c779b4748dc2059f8fbc85552ce4b406