Not compatible with latest wordpress version
mrdrogdrog opened this issue · 3 comments
Hi,
I'm running wordpress 5.2.4 and I can't use primer anymore.
When I try to create or edit a post I get this error.
Error Details
=============
An error of type E_ERROR was caused in line 255 of the file /wordpress/wp-content/themes/primer/inc/customizer/layouts.php. Error message: Uncaught TypeError: Argument 2 passed to Primer_Customizer_Layouts::add_meta_box() must be an instance of WP_Post, instance of stdClass given, called in /wordpress/wp-includes/class-wp-hook.php on line 286 and defined in /wordpress/wp-content/themes/primer/inc/customizer/layouts.php:255
Stack trace:
#0 /wordpress/wp-includes/class-wp-hook.php(286): Primer_Customizer_Layouts->add_meta_box(NULL, Object(stdClass))
#1 /wordpress/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
#2 /wordpress/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
#3 /wordpress/wp-admin/includes/meta-boxes.php(1526): do_action('add_meta_boxes', NULL, Object(stdClass))
#4 /wordpress/wp-admin/edit-form-advanced.php(250): register_and_do_post_meta_boxes(Object(stdClass))
#5 /wordpress/wp-admin/post-new.php(75): include('/var/www/polyod...')
#6 {main}
thrown
Hi @mrdrogdrog
What version of Primer do you have installed? I have just tested on 5.2.4 and the latest 5.3 beta release and I am not seeing that issue.
Hello,
I fixed this on my own. The problem wasn't the theme, it was the corrupt database. I tried to resolve this issue for hours and every time the error came up it pointed to the theme code. The wordpress error stack trace wasn't very helpful.
A reinstall and reimport of the database helped.
I'm really sorry I bothered you.
@mrdrogdrog No worries at all - I'm glad to hear that you were able to get things resolved and the root cause wasn't our theme 🎉 . Have a great rest of your week. Don't hesitate to reach back out if you encounter any other issues.