Project

General

Profile

Actions

Bug #103978

open

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

Added by Joh. Feustel 6 months ago. Updated 4 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Extbase
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 6 months 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 #2

Updated by Garvin Hicking 4 months ago

  • Category set to Extbase
Actions

Also available in: Atom PDF