You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When translating section names in translations/[locale]/site.php and you (by chance or by choice) have two sections with the same name it can cause the permissions form to overwrite the first section with the second.
Steps to reproduce
Create site.php translations file in your language
That’s a tricky one. Your proposed fix would certainly fix the underlying issue, but those array keys are the human-facing group headings, so the unintended side effect would be that the group headings would start showing the section handles rather than their titles, which isn’t desired.
The only good fix for this is to stop indexing the array by headings, and move the headings into a nested key. That’s a breaking change, though, so unfortunately can’t be done for 3.x. I’ve just made the change for Craft 4, though (d3d20ba). In the meantime, you’ll just have to avoid using identical section names.
Description
When translating section names in
translations/[locale]/site.php
and you (by chance or by choice) have two sections with the same name it can cause the permissions form to overwrite the first section with the second.Steps to reproduce
site.php
translations file in your languagehttp://you-are-wonderful.local/admin/settings/users/groups/1
Cause
In my specific case this is happening here:
cms/src/services/UserPermissions.php
Lines 163 to 172 in decad72
Fix?
This fix may have unintended side-effects, I'm not very well acquainted with the source code, but at least it's a starting point.
Additional info
PHP version:Database driver & version:Plugins & versions:The text was updated successfully, but these errors were encountered: