craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.22k stars 627 forks source link

Seeing Additional Tabs in Users #4256

Closed rogertinch closed 5 years ago

rogertinch commented 5 years ago

Description

I adjusted permissions for a Publisher User Group and am now seeing non-User tabs and fields in the User edit screen.

image

Steps to reproduce

  1. Create 2 different user groups
  2. Create 2 different sets of permissions for the user groups
  3. Assign some users to one user group and the rest on the other user group
  4. Go into a User to edit which User Group they're part of and you see non-User tabs showing up in the UI

Additional info

Plugins & versions:

brandonkelly commented 5 years ago

Did you use any plugins that may have made changes to your project config (such as duplicating/migrating fields or other settings, etc.)? The only way I can see this happening is if somehow you are sharing the same field layout between users and something else on your site.

rogertinch commented 5 years ago

It does look it's related to permission changes made in settings for the Workflow plugin. It's using the same fieldLayouts as our Movie entry type. Is there an easy fix for this? I've created an issue on the Workflow repo as well.

rogertinch commented 5 years ago

The weird part is that my local and our production is using the same project config, but this issue is only cropping up on production.

andris-sevcenko commented 5 years ago

That's because of a bug with project-config/rebuild that's been fixed in db2639777b067163901bc74809968b46e41a159c. The reason you see this only in one environment is that you've run project-config/rebuild on that environment.

To fix that, you'll have to edit your project.yaml file, remove the extra field layout that was added there under users.fieldLayouts key and run ./craft project-config/sync --force

rogertinch commented 5 years ago

Is this fixed in 3.2.0-alpha.5?

andris-sevcenko commented 5 years ago

That fix hasn't been a part of any release yet.

brandonkelly commented 5 years ago

@tinchalamo I just merged develop into the 3.2 branch, so you can get the fix by changing your craftcms/cms requirement in composer.json to:

"require": {
  "craftcms/cms": "3.2.x-dev#ac5e0272ce33db948de57c4cbd2fe72f9fc3eb60 as 3.2.0-alpha.5",
  "...": "..."
}

Then run composer update, then follow Andris’ instructions in https://github.com/craftcms/cms/issues/4256#issuecomment-492103269.

rogertinch commented 5 years ago

@brandonkelly I updated my local install, made the project.yaml change per @andris-sevcenko and ran ./craft project-config/sync --force, but then got this error in terminal error: Maximum number of deferred events reached. Is that something to be concerned about?

brandonkelly commented 5 years ago

Hm, yeah that error is a problem. Can you please send your composer.json, composer.lock, and config/project.yaml files, plus a database backup over to support@craftcms.com and reference this issue URL?

rogertinch commented 5 years ago

Just sent! Thanks for taking a look.