#106444Action link viewhelper should not duplicate extension name
Description
I create an action link like this:
<f:link.action action="choseTips" pluginName="myextension_tips" pageUid="...">
Tipps hinzufügen
</f:link.action>
The URL gets generated like this:
?tx_myextension_myextension_tips[action]
So the extension part of the plugin gets repeated. Took me a while to see even staring at the link.
Then the action gets forwarded to the default action by error handling and it is hard to detect why we land in the wrong action.
Reviews 1
History 911
-
Lina Wolf changed category <span data-processor="relativetime" data-value="2025-03-27T09:00:14+00:00" > 03/27/25, 09:00 </span>
-
Torben Hansen commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2025-03-29T17:50:04+00:00" > 03/29/25, 17:50 </span> -
Lina Wolf commented <span data-processor="relativetime" data-value="2025-03-30T13:54:44+00:00" > 03/30/25, 13:54 </span>
The integrator needs to know the exact difference between CType and plugin name then. If they make an error there is no error message, wrong links get generated, the user is forwarded to the default action and there is confusion as to why the parameters are not working.
I just think this is an error that we could catch. -
Lina Wolf changed status
Needs FeedbackNew <span data-processor="relativetime" data-value="2025-03-31T05:57:45+00:00" > 03/31/25, 05:57 </span> -
Georg Ringer commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2025-04-16T15:18:56+00:00" > 04/16/25, 15:18 </span>what do you expect? should the link not be rendered, logged? exception?
-
Lina Wolf commented and changed status
Needs FeedbackNew <span data-processor="relativetime" data-value="2025-04-25T14:38:57+00:00" > 04/25/25, 14:38 </span>I would expect either and exception or that it works and creates links like `?tx_myextension_tips[action]`
We could for example only allow a-zA-Z0-9 for parameter pluginName and throw an exception when something else is entered. I dont know if it is feasible to look up in the Extbase registry if there is a plugin of that name or if that would take up to much time.Another possibility would be to test for the existence of an underscore and if there is exactly one to split by underscore and use the first part for extension and the last part for the plugin
-
Gerrit Code Review pushed patch set 1 for main to change 89242 status
NewUnder Review <span data-processor="relativetime" data-value="2025-04-26T06:50:27+00:00" > 04/26/25, 06:50 </span> -
Lina Wolf commented <span data-processor="relativetime" data-value="2025-04-26T06:51:37+00:00" > 04/26/25, 06:51 </span>
@just2b I added a Change to demonstrate how I would imagagine this
-
Gerrit Code Review pushed patch set 2 for main to change 89242 <span data-processor="relativetime" data-value="2025-04-26T06:58:32+00:00" > 04/26/25, 06:58 </span>
-
Torben Hansen commented and changed status
Under ReviewNeeds Feedback <span data-processor="relativetime" data-value="2025-05-31T05:32:57+00:00" > 05/31/25, 05:32 </span>Can this issue be closed? The suggested patch has been Abandoned.
-
Christian Kuhn changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2026-03-03T14:54:26+00:00" > 03/03/26, 14:54 </span>
This is actually not a bug, since the parameter
pluginNamemust only include the plugin name and not a combination of extension name and plugin name. The plugin name is always the plugin name defined inExtensionUtility::configurePlugin.Additionally, the ViewHelper has a dedicated parameter named
extensionNameto define the extension name (if required or different than current extension name) and if this is ommited, the current extension name is added automatically.So basically, you do not use the ViewHelper as intended, because you provide a wrong/not existing pluginName and ommit the extensionName parameter.