#69818ExtensionService - getPluginNamespace should have signalSlot to build (not only set via TypoScript) own pluginnamespace
Description
Sometimes it would be good to be able to override the pluginnamespace more dynamically then just using the TypoScript setting allows.
For instance appending a Input-Fieldnmae of the content element or the UID.
The reason is if you intend to create a plugin that can/should be used multiple times on the same site the pluginNamespace defines which plugin is actually involved.
As the ExtensionService itself is injected in quite a lot of classes it is a bit complicated to get the change to work everywhere.
The easist solution would add a signalSlot that allows to modify the default pluginnamespace.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[BUGFIX] ExtensionService - getPluginNamespace should have signalSlot to build (not only set via TypoScript) own pluginnamespace Resolves: #69818 Releases: main
History 8
-
Mathias Brodala commented <span data-processor="relativetime" data-value="2015-09-15T12:37:32+00:00" > 09/15/15, 12:37 </span>
-
Andreas Allacher commented <span data-processor="relativetime" data-value="2015-09-15T14:55:37+00:00" > 09/15/15, 14:55 </span>
No, same plugin different namespaces.
e.g. I have a CE Element twice on the same page which are not related to each other at all.
Except that they are the same plugin. Therefore I would have to ensure the namespace is different for both.If it were just two it could be done via TS-Condition but this plugin will be used on multiple pages and multiple times. So the easiest way is to append the content element uid.
Another possibility I thought about would be to add the view.pluginNamespace as flexform setting that way one can override it via the settings and provide a default value via hook on storage
but honestly modifying the namespace directly in ExtensionService would be the easiest solution and I also think the best solution.
Maybe providing the ability to easily modify the ExtensionService per plugin like for RequestHandlers would also be a way to go. However, that is more complex especially since inject alone wouldn’t work and I think a signalslot should be enough and wouldn’t really hurt.
-
Benni Mack changed target version <span data-processor="relativetime" data-value="2015-09-24T19:21:56+00:00" > 09/24/15, 19:21 </span>
-
Georg Ringer changed Sprint Focus Needs Decision <span data-processor="relativetime" data-value="2020-03-27T02:17:31+00:00" > 03/27/20, 02:17 </span>
-
Andreas Kießling commented <span data-processor="relativetime" data-value="2023-03-03T22:36:32+00:00" > 03/03/23, 22:36 </span>
Any news on this? I debugged a 10.4 setup to have the same plugin with independent parameters and the best solution i came up with was to add a view.pluginNamespace field to the plugin flexform. Leaving the field empty creates the default namespace
It would be great however to have an event to modify the configuration that is returned from \TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager::getContextSpecificFrameworkConfiguration -
Benni Mack commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2026-01-25T11:43:53+00:00" > 01/25/26, 11:43 </span>First: We’ve removed the “list_type” logic and dynamic action logic in extbase, making this problem less of a problem in e.g. news.
However, this edge might still be the case, but I’m reluctant to do this with a PSR-14 event in the registration. Instead, I saw this in installations that solved it like this:
- imagine you want to have the news “list” plugin twice on a page
> but of course differentlyyou then add another plugin wit ha different plugin signature in ext_localconf.php (and Configuration/TCA/Overrides) but with the same actions in your own extensions
- you automatically have two separate plugins with the same logic but with different namespaces and without the need to determine this per UID of a content element.WDYT?
-
Andreas Kießling commented <span data-processor="relativetime" data-value="2026-01-25T12:56:17+00:00" > 01/25/26, 12:56 </span>
If i remember correctly, i needed this for a custom form/download plugin. Thus the user is able to place as much plugins as required on a page and one plugin should not trigger any other.
I’m not sure if there was/is another way to achieve this nowadays, but i think the flexform approach worked fine for the last update to v12 before i stepped down from that project.
—> any way to influence the plugin namespace from the controller etc. would be great to just wire in the uid of the content element.
Powermail seems to handle this with custom code and checks the submitted uid —> without a match it forwards to the form action.
> First: We’ve removed the “list_type” logic and dynamic action logic in extbase, making this problem less of a problem in e.g. news.
I don’t get that statement. Georg sets the namespace in the ext_localconf.php
https://github.com/georgringer/news/blob/39dc145262c1adbde44c2e89abeea74e27d7dfb8/ext_localconf.php#L163Here the usecase is the opposite: different plugins need to work together and share a common parameter namespace.
-
Benni Mack commented and changed status
Needs FeedbackNew <span data-processor="relativetime" data-value="2026-01-25T12:58:04+00:00" > 01/25/26, 12:58 </span>Andreas Kießling wrote in #note-7:
> I don’t get that statement. Georg sets the namespace in the ext_localconf.php
> https://github.com/georgringer/news/blob/39dc145262c1adbde44c2e89abeea74e27d7dfb8/ext_localconf.php#L163
>
> Here the usecase is the opposite: different plugins need to work together and share a common parameter namespace.Thanks for the clarification. I did not understand it this way.
Is this meant for multiple plugins to share the same namespace? In Extbase one can set
plugin.myext_myplugin.view.pluginNamespacefor this.