Review main Abandoned

77294[BUGFIX] Allow multiple plugins handling an extbase request

Georg Ringer CR 0 V 0 Easy +3 −8 updated 06/10/25, 14:51

Commit message

Especially with the drop of switchableControllerActions it is more
likely to have multiple plugins using the same action. If both plugins
can handle the given request no exception should be shown.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 2

Review log 2228

Show 23 earlier messages
  1. Georg Ringer uploaded patch set 1 01/09/23, 19:43

  2. Georg Ringer commented on patch set 1 01/09/23, 19:43

    This change is ready for review.
  3. core-ci voted on patch set 1 V -1 01/09/23, 19:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35614

  1. Georg Ringer uploaded patch set 2 V -1 01/09/23, 19:53

  2. core-ci voted on patch set 2 V +1 01/09/23, 20:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35615

  3. Oliver Klee commented on patch set 2 01/09/23, 20:10

    ExtensionServiceTest.php:184

    Let‘s instead please concert this to a positive test that two plugins can handle the same request.
  4. Georg Ringer uploaded patch set 3 V +1 01/10/23, 07:57

  5. core-ci voted on patch set 3 V -1 01/10/23, 08:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35630

  6. Benni Mack commented on patch set 4 V -1 01/10/23, 09:17

    Published edit on patch set 3.
  7. Benni Mack voted on patch set 4 CR +2 01/10/23, 09:17

  8. Benni Mack voted on patch set 4 V +1 CR +1 01/10/23, 09:17

  9. core-ci voted on patch set 4 V +1 01/10/23, 09:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35635

  10. Georg Ringer rebased onto patch set 5 CR +1 V +1 02/15/23, 12:58

  11. core-ci voted on patch set 5 V +1 02/15/23, 13:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37747

  12. Georg Ringer commented on patch set 5 02/15/23, 14:08

    ExtensionServiceTest.php:184 Reply

    IMO this is something different. it is not about which plugin can handle the request but that it is allowed that the same controller/action is allowed in more than one plugin
  13. Oliver Klee commented on patch set 5 02/15/23, 15:05

    ExtensionServiceTest.php:184 Reply

    Then I probably have misunderstood the change. Anyway, my point is that we should have a test for the changed/added/fixed behavior instead of only removing the test for the old behavior (which would result in the new behavior being untested).
  14. Georg Ringer commented on patch set 5 02/17/23, 06:46

    ExtensionServiceTest.php:184 Reply Unresolved

    the only usage is in uribuilder which fails if 2 plugins can handle the same action which is just bogus because this is absolutly valid
  15. Markus Klein commented on patch set 5 03/20/23, 09:17

    ExtensionService.php:112

    I suggest returning null if more than 1 plugin is found. Because it is the up to the caller (uribuilder) to decide on the plugin to use. In case of uribuilder that's the current one then, which is totally fine.
  16. Benni Mack updated the commit message in patch set 6 V +1 05/03/23, 09:37

  17. Oliver Klee commented on patch set 6 07/16/23, 08:34

    How can we continue here?
  18. Oliver Klee wrote 08/25/24, 10:13

    Removed cc Oliver Klee.
  19. Benni Mack updated the commit message in patch set 7 10/18/24, 13:47

  20. Oli Bartsch uploaded patch set 8 04/24/25, 20:03

  21. core-ci voted on patch set 8 V +1 04/24/25, 20:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/78150

  22. Stefan Bürk commented on patch set 8 04/27/25, 13:38

    ExtensionService.php:112 Reply

    I'm not a fan of removing this exception, at best it should become a concrete exception class, for example `MultiplePluginsForActionFoundException) or similar. UriBuilder should be modified to call this method only when "no" pluginName is given (as argument) and if not provided within the request (current extbase request). There, the exception can be catched and rethrown with a more specific exception message - or further up within the ViewHelper. I'd say that in case that muliptle plugins contains the same action allowing this and returning the "first" possible plugin is not good, as this silence away the misuse / not deterministic setting when no current pluginName is set and using the wring "plugin" name silently then - an error which will slip through reviews and may be undetected within projects. Having a concrete Exception here helps do directly identifiy the not deterministic use in templates and that a manual "pluginName" needs to be provided to be exact. We could think about having a new additional argument `?string $requestPluginName = null ` handed over and check when a pluginName is provided that the action is valid for that case - or handle that outside. I get the basic point of the issue, but I don't feel that simply removing this exception here is the best way to solve it and would give integrators even more headache and search for errors in templates using viewhelpers. When removing this this exception, it will not reconize the current plugin in the request which may be valid for this action. So I think keeping this exception (in a concrete implemetnation) and handling it in UriBuilder / ViewHelpers in a more proper way to make that more reasonable or even checking current request plugin if it is allowed and return "this" plugin name instead. That would make it easier for integrators to implement things in most cases but still directly hinting for ambigous configuration which needs do be manually defined before ever committing and publishing something to stage.
  23. Georg Ringer commented on patch set 8 06/07/25, 20:20

    ExtensionService.php:112 Reply

    hey @stefan@buerk.tech sorry don't really get the lengthy answer. I got a concreate issue with ext:news having one namespace which is shared by all plugins. IMO this is valid and shouldn't throw any exceptions
  24. Christian Kuhn commented on patch set 8 CR -1 06/10/25, 11:14

    ExtensionService.php:112 Reply Unresolved

    Hey. To my understanding, removing this exception leads to two new issues: * It adds ambiguity that depends on the registered order of plugins when there are two plugins with the same action. This makes it more brittle and adds hard to debug magic. * Usually, two registered plugins lead to two different namespaces. If those have the same action names, and there is no exception, one could easily link to the wrong plugin if pluginName is not given. I think the given solution without patch is the only sane solution: If there are plugins with the same name action name, a consumer *must* specific 'pluginName' to avoid hard to debug issues and magic. It is good that current extbase excepts on this.
  25. Georg Ringer abandoned the change 06/10/25, 14:51