Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin confilct(s) - EE_Admin_Page passes null to 'add_meta_boxes' for both $post_type and $post #3360

Closed
Pebblo opened this issue Apr 7, 2021 · 1 comment
Assignees

Comments

@Pebblo
Copy link
Member

Pebblo commented Apr 7, 2021

Within admin_details_wrapper.template.php we use:

do_action('add_meta_boxes', $post_type, $post);

This is causing issues with some plugins as they have a type declaration of string for $post_type and it breaks our admin pages as they are null within EE.

The latest example is with SearchWP:

Fatal error: Uncaught Error: Argument 1 passed to SearchWP\Sources\Attachment::document_content_meta_box() must be of the type string, null given, 
called in \wp-includes\class-wp-hook.php on line 289
in \wp-content\plugins\searchwp\includes\Sources\Attachment.php on line 390

To Reproduce
Install SearchWP and active, then go to Event Espresso -> General Settings, Calendar, Payment methods, maintenance etc.

Or, add a callback to add_meta_boxes that requires $post_type is passed as a string and visit the above.

Screenshots
https://monosnap.com/file/1bFEhwMAzi0FtNml75zwCJDIH7omhO
(The kint output at the top of the page is me confirming what whose globals are)

@Pebblo
Copy link
Member Author

Pebblo commented Apr 7, 2021

Fixed in #3361.

Closing out.

@Pebblo Pebblo closed this as completed Apr 7, 2021
@Pebblo Pebblo assigned Pebblo and unassigned tn3rb Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants