caseproof / members

Members WordPress plugin.
GNU General Public License v2.0
78 stars 35 forks source link

Gutenberg Editor Freezes and Crashes the browser #35

Closed Mustafa-Agha closed 3 years ago

Mustafa-Agha commented 3 years ago

I created a custom post type event

// Register a new post type Events.

register_post_type('event', [
    'capability_type' => 'event',
    'map_meta_cap' => true,
    'supports' => ['title', 'editor', 'excerpt'],
    'rewrite' => ['slug' => 'events'],
    'has_archive' => true,
    'public' => true,
    'labels' => [
        'name' => 'Events',
        'add_new_item' => 'Add New Event',
        'edit_item' => 'Edit Event',
        'all_items' => 'All Events',
        'singular_name' => 'Event'
    ],
    'menu_icon' => 'dashicons-calendar'
]);

Then I added a new Role called "Event Planner" and gave it these permissions

General -> Read Events -> edit_events, edit_others_events, delete_events, publish_events, read_private_events, delete_private_events, delete_published_events, delete_others_events, edit_private_events, edit_published_events.

and Assigned this role to a user from Users Roles -> Event Planner (only this role) and disabled the rest.

Now when I try to edit an event or create one with the Gutenberg Editor the browser crashes. not just for me but for a lot of people as well.

I had to remove the arg 'show_in_rest' => true to go back to classic Editor. Is this a Bug or is there a work around this issue.

WordPress: Version 5.6 Members – Membership & User Role Editor Plugin: Version: 3.1.3 OS: Ubuntu 20.4 Chrome: Version 87.0.4280.88 (Official Build) (64-bit)

JackieKrkwd commented 3 years ago

I am having this same issue. Watching for response.

metalandcoffee commented 3 years ago

Hi @Mustafa-Agha & @JackRie - Looks like this was a WordPress core issue. The fix is in the latest version of the Gutenberg plugin so I would recommended installing that plugin for now to use the newest version of Gutenberg. The fix should be in the next core release.

See reference: https://github.com/WordPress/gutenberg/issues/27854

JackieKrkwd commented 3 years ago

@metalandcoffee Just downloaded Gutenberg and tested it and we're in business. Thanks so much for the help!