Closed terriann closed 2 years ago
I'm also encountering this issue on the VIP platform and came to the same conclusion as @terriann as far as arguments from the WPSEO_Role_Manager_VIP->add_role
method not matching the wpcom_vip_add_role
function signature.
I would also note that many people may not encounter this if the site was originally built locally or on another platform and then the database was uploaded to VIP since the roles with the capabilities already existed. However if the site has the vip-go-mu-plugins repo
enabled, it is reproducible every time.
I'm also experiencing this same issue on the VIP platform. Will this issue be prioritized at some point?
Please give us a description of what happened.
On the WordPress VIP Platform, the
wpseo_manager
andwpseo_editor
roles have a sequence of numeric capabilities.This results in any users assigned to either of those roles not being able to navigate in
/wp-admin
, seeing aSorry, you are not allowed to access this page
error immediately after a successful login.Please describe what you expected to happen and why.
I expected the results of the WP-CLI command
wp cap list wpseo_editor
to return a list of readable capabilities.Example:
How can we reproduce this behavior?
vip-go-mu-plugins
) install and activate Yoast SEOwp cap list wpseo_manager
Debugging Notes
It looks like the structure of the array of capabilities,
$enabled_capabilities
, which is passed towpcom_vip_add_role()
inclass-role-manager-vip.php
is the source.When I make the following change in
class-role-manager-vip.php
, followed by deactivating and re-activating the plugin, the roles then have an expected list of capabilities.Additional Resources
Technical info
Used versions
vip-go-mu-plugins