Issue Bug Closed

#103978Cross linking to another extension controller action with <f:link.action viewhelper broken

Joh. Feustel 06/04/24, 22:31 updated 10/03/26, 19:02

Description

It seems to be not possible to link from one BE module template to an action of another extension using the <f:link.action ViewHelper.
The Viewhelper documentation states, that this should be possible when adressing action, controller, extensionName and plugin attributes.

The following code will render only the plain text without linking it.

<f:link.action action="list" controller="MyController" extensionName="myotherextension" pluginName="myotherextension_mycontroller" >
    link to another extension controller action
</f:link.action>

It seems that somewhere in \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::buildBackendUri the routeIdentifier gets taken from the request object. So from the first extension. That way it cannot create a route to the second extension.

A workaround seems to be to add the route as an argument like

<f:link.action action="list" controller="MyController" extensionName="myotherextension" pluginName="myotherextension_mycontroller"
  arguments="{route: 'myotherextension_mycontroller.MyController_list'}">
    link to another extension controller action
</f:link.action>

But that does not seem to be the right way and does not follow the documentation.
Do I miss something?

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 4

  1. Garvin Hicking commented <span data-processor="relativetime" data-value="2024-06-05T11:22:35+00:00" > 06/05/24, 11:22 </span>

    The routing in BE and FE for Extbase is definitely quite different, so code-wise this will probably only work using the workaround you did at this time.

    Technically it might be possible to allow that, but sadly not an area of expertise of mine…

  2. Georg Ringer commented and changed status New Closed <span data-processor="relativetime" data-value="2026-10-03T19:02:54+00:00" > 10/03/26, 19:02 </span>

    fixed with #106174