Skip to content

Gutenberg editor not working if change capabilities for user role #68577

@bradhogan

Description

@bradhogan

Description

Initially came across this bug when using the PublishPress Capabilities plugin but if you change the user capabilities manually it occurs as well.

Step-by-step reproduction instructions

  1. Make sure Gutenberg plugin is active
  2. Create a new user and set this user as an "author" role
  3. Change the user's capabilities for the author role to allow the author to edit and publish PAGES
  4. You can make the above change using the PublishPress Capabilities plugin if you want then just deactivate the plugin (the capabilities should still be in place without the plugin)
  5. In your admin user, create a page and use a default pattern with a bunch of blocks so the editor has content / blocks
  6. See that the editor and blocks appear as they should
  7. Assign the author of that new page to the author role user
  8. Switch users to be logged in as the author, then try to edit the page
  9. Notice the editor is blank
  10. Deactivate Gutenberg plugin then go back to edit page as your author user and notice the blocks are now there

Screenshots, screen recording, code snippet

No response

Environment info

  • wp 6.7.1
  • gutenberg 19.9.0
  • chrome
  • mac

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Template Editing ModeRelated to the template editor available in the Block Editor[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions