Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with multiselect usergroup when user already exists #526

Open
wtfred opened this issue Sep 21, 2023 · 1 comment
Open

Problem with multiselect usergroup when user already exists #526

wtfred opened this issue Sep 21, 2023 · 1 comment

Comments

@wtfred
Copy link

wtfred commented Sep 21, 2023

Hello,

Using femanager 7.2.1, there is a problem with usergroup as multiselect.

Step to reproduce:

  • create a registration form with username and usergroup
  • override Usergroup.html template to render the "multiselect" section
  • try to register a user that is already existing

=> if you don't select any group, you have the expected error message
=> if you select at least one usergroup, then you have a Core Exception

"PHP Warning: Array to string conversion in /var/www/html/vendor/typo3fluid/fluid/src/Core/ViewHelper/TagBuilder.php line 200"

@pixeldesu
Copy link
Member

I tried replicating this in Femanager v8 and I indeed got an error while doing so, which wasn't exactly related to the error above but might have the similar cause.

If you updated the Usergroup.html partial to work with multiple groups using the multiple="true" attribute, then you also need to remove the [0] from the name attribute of the same ViewHelper. Because if you only change to multiple you are now transmitting an array inside an array of usergroups, which multiple parts of TYPO3 probably have an issue with handling (in my case it's the PropertyMapper)

Could your error maybe be related to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants