Skip to content

Error message not correctly displayed #141

@dottxado

Description

@dottxado

I have customized the capabilities, removing the possibility of creating guest users, but the editor is showing an error on displaying the error:
image

I'm aware of #76, but this issue is about showing the right error message provided from the backend.

How to reproduce:

  1. Add in a plugin a code like this
add_filter('user_has_cap', 'removeGuestAuthorCap', 9999);

function removeGuestAuthorCap(array $user_caps): array
    {
        unset($user_caps['create_guest_authors']);

        return $user_caps;
    }
  1. Login to WordPress admin panel as an user that's not a Super Admin
  2. Try to add a guest author to a post
  3. The error message shown in the editor should report "undefined"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions