?
avatar C-Lodder
C-Lodder
15 Jan 2019

Steps to reproduce the issue

Add the following field to modules/mod_login/mod_login.xml:

<field name="test" type="usergroup" multiple="true" label="Usergroup" />

Expected result

Ability to select multiple usergroups which then become appended to the input (similar to selecting tags for an article)

Actual result

Warning: htmlspecialchars() expects parameter 1 to be string, array given in C:\dev\joomla4\layouts\joomla\form\field\text.php on line 96

screenshot_2019-01-15 modules login - joomla 4 - administration

System information (as much as possible)

  • 4.0-dev build
  • PHP 7.2.10

Additional comments

I assume it's most likely calling the wrong layout

avatar C-Lodder C-Lodder - open - 15 Jan 2019
avatar joomla-cms-bot joomla-cms-bot - change - 15 Jan 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Jan 2019
avatar infograf768
infograf768 - comment - 15 Jan 2019

Can you explain what you are trying to do with such a field in the login module?
Limiting login to specific groups?
BTW: Unhappily, selecting a tag or multiple tags is badly broken in 4.0

avatar infograf768
infograf768 - comment - 15 Jan 2019

BTW, such a field exists for debug

				<field
					name="filter_groups"
					type="usergrouplist"
					label="PLG_DEBUG_FIELD_ALLOWED_GROUPS_LABEL"
					multiple="true"
					filter="int_array"
					size="10"
				/>

and it works there for what it does.

avatar C-Lodder C-Lodder - change - 15 Jan 2019
Status New Closed
Closed_Date 0000-00-00 00:00:00 2019-01-15 10:46:14
Closed_By C-Lodder
avatar C-Lodder
C-Lodder - comment - 15 Jan 2019

@infograf768 Adding it to the Login module was purely an example. I'm trying to use it in my own extension.

usergrouplist seems to work...thanks.

That said, if usergroup is deprecated and is planned to be removed in J4, I still shouldn't be geetting an error, seeing

avatar C-Lodder C-Lodder - close - 15 Jan 2019
avatar infograf768
infograf768 - comment - 15 Jan 2019

The logic would be that for "usergroups" as for "tag" we get a new field type similar to CategoryeditField.php or ModulesPositioneditField.php using choice.js.
No idea if anyone working on that

Add a Comment

Login with GitHub to post a comment