Feature PR-6.1-dev Pending

User tests: Successful: Unsuccessful:

avatar Ruud68
Ruud68
11 Nov 2025

Pull Request for Issue # -.

Summary of Changes

In form xml files you can add useglobal="true", this will then extend the field to show the value for the field in the matching component options.

This PR extends the useglobal to not only use the component options but also a plugins options.

This will create the possibility to have the same functionality it had but then for (global) plugin parameters.

This is a POC on the 'text' field to see if there is interest in this change, if so I can further extend it to the other fields that have the useglobal functionality:

  • MailtemplateLayoutField
  • ComponentLayoutField
  • ListField
  • NumberField
  • PluginsField

Testing Instructions

on a formfield you can now have the following useglobal settings:

  • useglobal="true": this will take the configured field value from the component
  • useglobal="plg_system_xyz": this will take the configured value from the plugin with type 'system' and name 'xyz'

in file ./administrator/components/com_content/forms/article.xml change field "float_into" to use com_content as useglobal value:

			<field
				name="float_intro"
				type="text"
				label="COM_CONTENT_FIELD_IMAGE_CLASS_LABEL"
				description="COM_CONTENT_FIELD_IMAGE_CLASS_DESC"
				useglobal="com_content"
				validate="CssIdentifier"
			/>

after this field add the following field:

			<field
				name="article_index_text"
				type="text"
				label="PLG_CONTENT_PAGEBREAK_SITE_ARTICLEINDEXTEXT"
				useglobal="plg_content_pagebreak"
			/>

in plugin content page break add some text to field "Custom Article Index Heading", this will be your global value.

In the backend open an article for editing, open tab "Images and Links", in set "Intro Image" you should now see field "Image Class" and field (untranslated) "PLG_CONTENT_PAGEBREAK_SITE_ARTICLEINDEXTEXT" having "Use Global (....)" as value.
changing the useglobal to "true" in both fields, will still show the same value for the Intro Image (as it uses the fallback to component com_content), but empty for field "article_index_text" as that fallsback to the com_content component which doesn't have this field.

Try to fill in (bogus) values in the useglobal for these fields, these should then fallback to the component values

Actual result BEFORE applying this Pull Request

The text field would show empty

Expected result AFTER applying this Pull Request

The textfield will show 'Use Global (abc)' where abc is the value of the field in the plugin configuration

Link to documentations

Please select:

avatar Ruud68 Ruud68 - open - 11 Nov 2025
avatar Ruud68 Ruud68 - change - 11 Nov 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 11 Nov 2025
Category Libraries
avatar Ruud68 Ruud68 - change - 11 Nov 2025
Labels Added: Feature PR-6.1-dev
avatar bembelimen bembelimen - change - 16 Nov 2025
Title
Expand useGlobal to also use plugin parameters
[6.1] Expand useGlobal to also use plugin parameters
avatar bembelimen bembelimen - edited - 16 Nov 2025
avatar laoneo
laoneo - comment - 19 Nov 2025

Nice one. For consistency, I would also support the component name and then deprecate the true attribute for useglobal. Like that we can get rid of the global input parameter.

avatar Ruud68
Ruud68 - comment - 19 Nov 2025

Hi @laoneo Thanks, glad you like it. Already have this in place for my plugins via overrides: works like a charm :)

I will make a change so you can use component name or plugin name, with a fallback of 'true' to the component name from the input parameter.

If this is something that would get integrated i can also do the other fields that now have 'useglobal' support.
Not to keen on 'wasting' time on this if it doesn't get integrated in the end, so just checking in advance :)

avatar laoneo
laoneo - comment - 19 Nov 2025

Sure. We can also get this RTC and then expand from there.

avatar Ruud68
Ruud68 - comment - 19 Nov 2025

You can now use component name e.g. 'com_content', plugin name or 'true' as B/C fallback

avatar laoneo
laoneo - comment - 20 Nov 2025

Cool, I would replace one occurrence in core for plugins and one for a component. Like that it can be tested relatively easy.

avatar Ruud68
Ruud68 - comment - 20 Nov 2025

For core a replacement can be made, but not for plugins as that is a new feature and not used in core.
I can make test instructions where the tester than can add themselves a field to a form and set the different useglobal values.

As a side note: why is the CI Joomla Check PHP code style failing on the use of a '' on e.g. \str_starts_with, but it is allowing it on \is_null?

avatar Ruud68 Ruud68 - change - 20 Nov 2025
The description was changed
avatar Ruud68 Ruud68 - edited - 20 Nov 2025
avatar Ruud68
Ruud68 - comment - 20 Nov 2025

I updated the test instructions in the OP. is that sufficient?

avatar laoneo laoneo - test_item - 12 Dec 2025 - Tested successfully
avatar laoneo
laoneo - comment - 12 Dec 2025

I have tested this item ✅ successfully on 0655490


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46439.

avatar laoneo
laoneo - comment - 12 Dec 2025

Here is the screenshot for my test
image

avatar HLeithner
HLeithner - comment - 12 Dec 2025

Is there a reason why it's limited to plugin, isn't this useful for modules and templates too?

avatar Ruud68
Ruud68 - comment - 12 Dec 2025

@laoneo Thanks for testing! Hope someone else will also step in to test so we can get this to RTC (and merged)

avatar laoneo
laoneo - comment - 15 Dec 2025

@HLeithner we can expand later.

avatar Ruud68
Ruud68 - comment - 18 Dec 2025

So with this PR we can also use the component name in the useglobal parameter, this is actually adding extra value.
I'm currently developing a custom component with multiple 'import' plugins for data sources. So with this PR I would be able to use global config settings in the plugin config. This is awesome! Now when I want to make a global change I have to update all plugin configuration values, with the useglobal in this PR I can just update the config value of the component and all plugins will 'inherit' / use this value.

That said: I'm looking for somebody who is willing and able to 'adopt' this PR. I'm closing all my contributions that get no traction: this is, despite the welcoming words and effort put in by @laoneo, one of them.

avatar HLeithner
HLeithner - comment - 18 Dec 2025

Would you be so kind and give me an answer?

Is there a reason why it's limited to plugin, isn't this useful for modules and templates too?

avatar joomdonation
joomdonation - comment - 18 Dec 2025

Is there a reason why it's limited to plugin, isn't this useful for modules and templates too?

I guess it is because for a module, there could be multiple instances of the module, so we do not have params data available for a module (base on it's name). Same for templates.

avatar Ruud68
Ruud68 - comment - 18 Dec 2025

spot on @joomdonation

avatar Ruud68 Ruud68 - change - 2 Jan 2026
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2026-01-02 08:34:38
Closed_By Ruud68
avatar Ruud68 Ruud68 - close - 2 Jan 2026
avatar laoneo
laoneo - comment - 3 Jan 2026

Why did you close?

avatar Ruud68
Ruud68 - comment - 4 Jan 2026

Hi @laoneo ,
I find it very hard to maintain the fullfilment I seek when giving back to this project. I've decided to move on from my pending contributions here to volunteer on other projects.

avatar LadySolveig
LadySolveig - comment - 5 Jan 2026

@Ruud68 It's a really good improvement that I, at least, can easily imagine being included in the core. Very sad that you've decided to close it. Alternatively, we could create an issue for the additional use cases and link to your PR?
That way, someone else might take over from you and expand on it when they have time, and it won't be lost.

I don't want to question your decision at all, but I would be happy if you reconsidered and reopened it. Then we would only need suitable testers.

avatar Ruud68
Ruud68 - comment - 5 Jan 2026

or somebody creates a new PR, the code is still here.

avatar laoneo
laoneo - comment - 5 Jan 2026

If you can reopen, would be cool. We need only one test.

avatar laoneo
laoneo - comment - 5 Jan 2026

And it needs also some documentation updates.

Add a Comment

Login with GitHub to post a comment