Project

General

Profile

Actions

Bug #103978

open

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

Added by Joh. Feustel about 1 month ago. Updated about 1 month ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2024-06-05
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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?

Actions #1

Updated by Garvin Hicking about 1 month ago

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...

Actions

Also available in: Atom PDF