Since we updated Event Espresso to 5.0.10.p, we are getting the following PHP fatal error when an Editor logs in.
Also, all WordPress dashboard screens become white and non-functional.
Can you check if you can reproduce this issue?
Please advice on how to fix this.
Thank you.
—————–
2023/10/20 08:56:32 [error] 130351#130351: *12700 FastCGI sent in stderr: “PHP message: PHP Warning: Trying to access array offset on value of type null in /www/xxxxx/public/wp-admin/menu-header.php on line 202PHP message: PHP Fatal error: Uncaught TypeError: EE_Capabilities::map_meta_caps(): Argument #2 ($cap) must be of type string, null given, called in /www/xxxxxxx/public/wp-includes/class-wp-hook.php on line 308 and defined in /www/xxxxxxx/public/wp-content/plugins/event-espresso-core-reg/core/EE_Capabilities.core.php:317
Stack trace:
#0 /www/xxxxxx/public/wp-includes/class-wp-hook.php(308): EE_Capabilities->map_meta_caps(Array, NULL, 29543, Array)
#1 /www/xxxxx/public/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array)
#2 /www/xxxxxx/public/wp-includes/capabilities.php(838): apply_filters(‘map_meta_cap’, Array, NULL, 29543, Array)
#3 /www/xxxxxx/public/wp-includes/class-wp-user.php(778): map_meta_cap(NULL, 29543)
#4 /www/xxxxxx/public/wp-includes/capabilities.php(981): WP_User->has_cap(NULL)
#5 /www/xxxxxx/public/wp-includes/capabilities.php(873): user_can(Object(WP_User), NULL)
#6 /www/xxxxxx/public/wp-admin/menu-header” while reading upstream, client: 2a02:587:c83e:f000:e66b:745e:4b5f:4caa, server: staging-xxxxxx.kinsta.cloud, request: “GET /wp-admin/ HTTP/2.0”, upstream: “fastcgi://unix:/var/run/php8.0-fpm-xxxxxx.sock:”, host: “staging-xxxxxx.kinsta.cloud:64823”, referrer: “https://staging-xxxxxx.kinsta.cloud/wp-login.php”
———————-
I can’t reproduce this but it looks like something is setting up menu/submenu items incorrectly on the site so it likely depends on the plugins you have active.
The error is from EE expecting some kind of string value (a capability) to be passed to current_user_can() but it is passed NULL which isn’t expected. A WP core function used to display the menu within the dashboard is processing the menu items and then passing a capability as null so somewhere along the line something is setting up menu items incorrectly.
I’ll check in with our developers on this.
Viewing 1 reply thread
The support post ‘PHP fatal error when you log in the back-end as an Editor’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.