Make use of field type="UserGroupList" like in Joomla Plugin User Token with namespace Joomla\Plugin\User\Token
<field
name="allowedUserGroups"
type="UserGroupList"
label="PLG_USER_TOKEN_ALLOWEDUSERGROUPS_LABEL"
description="PLG_USER_TOKEN_ALLOWEDUSERGROUPS_DESC"
layout="joomla.form.field.list-fancy-select"
multiple="true"
checksuperusergroup="0"
default="8"
/>
show users group fields
shows nothing
Put on type userGroupList instead makes it work. The first capital letter on the type makes the field to not load or not show the groups list.
<field
name="allowedUserGroups"
type="userGroupList"
label="PLG_USER_TOKEN_ALLOWEDUSERGROUPS_LABEL"
description="PLG_USER_TOKEN_ALLOWEDUSERGROUPS_DESC"
layout="joomla.form.field.list-fancy-select"
multiple="true"
checksuperusergroup="0"
default="8"
/>
Joomla 6.0.1
PHP 8.3.25
MySQL (PDO) 10.6.15-MariaDB
May the same error occured on other fields with the first letter capital.
| Labels |
Added:
No Code Attached Yet
|
||
I am sure but i dont know if its specified on the server but i dont think the server handles think like that but you never know.
I did a screen record. In every installation i got in Joomla 6.0.1 it occurs. All installations are completly clean of plugins or extra components and modules.
Are you using the latest 6.0.1? Cause in previous versions this was working fine as i remember.
https://www.awesomescreenshot.com/video/47736799?key=103e113c12d75f7e3d6c028615a1282a
As i see clearly now it needs to be all in lowercase.
It works also for me in all Joomla Versions. Obviously it does not work for you.
My question is - Is it only in 6.0.1? Is it only the first letter or all types with capital letters somewhere in the name?
Edit: Sorry, you answered the first question alread. Only in 6.0.1.
I label this as a bug .. at least we must investigate
| Labels |
Added:
bug
|
||
One question: what happens when you change the PHP version? I have different PHP versions but no PHP 8.3.25
In Joomla 6.0.1 we have
12 instances of type="usergrouplist"
3 instances of type="UserGroupList"
I fund a type="UserMessages"
I found a type="UserMessages"
I debugged the case and it's our autoloader which loads only fields with exactly the correct case, the file in question is called Usergrouplist.php, FormHelper makes the first character automatically Uppercase, so it works for usergrouplist and Usergrouplist but not with userGrouplist.
We have a PR for 6.1 which changes 2 of them to lowercase #46248
We should change all to a consistent format, since we have 12 lowercase we should I would suggest to convert the last one (after out PR also to lowercase).
PRs welcome, btw. this is also relevant for 5.4
nope, it also does something different but also fix the field type it self
sorry I should have read the code not just the title ;)
| Title |
|
||||||
| Status | New | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-01-09 11:21:17 |
| Closed_By | ⇒ | tecpromotion |
I am closing the issue as there is a PR that resolves it.
Are you sure?
Although there is inconsistency throughout core Joomla if this should be all lowercase or camelcase or something else we can see that in the user plugin Token that it is capitalised in the way that you say doesnt work but it does
joomla-cms/plugins/user/token/token.xml
Line 27 in 2ccd259