Upgrade to Anspress 4

5.39K viewsIssues
0

Upgraded one live site and got:

[11-Feb-2017 16:41:59 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘post_type IN (‘question’, ‘answer’) LIMIT 0,50′ at line 1 for query SELECT SQL_CALC_FOUND_ROWS ID, post_type, post_parent, post_status FROM wp_posts LEFT JOIN wp_ap_qameta ON post_id = ID WHERE ptype IS NULL post_type IN (‘question’, ‘answer’) LIMIT 0,50 made by do_action(‘wp_ajax_ap_migrator_4x’), WP_Hook->do_action, WP_Hook->apply_filters, AnsPress_Admin_Ajax::ap_migrator_4x, AP_Update_Helper->__construct, AP_Update_Helper->migrate_post_data

Just fixed it. Its look like this type is created in recent bug finding

0

Trying to fix the menu structure.

[12-Feb-2017 10:17:34 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get_queried_object() on null in /home/wp-includes/query.php:45
Stack trace:
#0 /home/wp-content/plugins/anspress-question-answer/includes/functions.php(137): get_queried_object()
#1 /home/wp-content/plugins/anspress-question-answer/includes/functions.php(160): is_anspress()
#2 /home/wp-content/plugins/anspress-question-answer/includes/views.php(40): is_question()
#3 /home/wp-includes/class-wp-hook.php(298): AnsPress_Views::insert_views(”)
#4 /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
#5 /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#6 /home/wp-includes/load.php(677): do_action(‘shutdown’)
#7 [internal function]: shutdown_action_hook()
#8 {main}
thrown in /home/wp-includes/query.php on line 45

commented on answer
You are viewing 1 out of 5 answers, click here to view all answers.