wp_popularpostssummary did not update on multi-site local activate
-
I updated a small WP Multi-site to WP v4.9 and then also updated WordPress Popular Posts to v4.0.12. I noticed my theme’s sidebar Popular widget was no longer working with the “Sorry. No data so far.” message while I knew I had visits. Pretty much every time I’ve seen this there’s been an error somewhere causing WPP not to work correctly. I looked at my error log and it had gone from 0 to 660K+ just today. The log was full of errors like this:
[20-Nov-2017 23:34:04 UTC] WordPress database error Unknown column 'v.view_datetime' in 'where clause' for query SELECT p.ID AS id, p.post_title AS title, p.post_author AS uid, p.post_excerpt AS post_excerpt, p.post_content AS post_content, ( SUM(v.pageviews)/(IF ( DATEDIFF('2017-11-20 18:34:04', DATE_SUB('2017-11-20 18:34:04', INTERVAL 6 DAY)) > 0, DATEDIFF('2017-11-20 18:34:04', DATE_SUB('2017-11-20 18:34:04', INTERVAL 6 DAY)), 1) ) ) AS avg_views FROM <code>pcv_21_popularpostssummary</code> v LEFT JOIN <code>pcv_21_posts</code> p ON v.postid = p.ID WHERE 1 = 1 AND p.post_type IN('post') AND v.view_datetime > DATE_SUB('2017-11-20 18:34:04', INTERVAL 6 DAY) AND p.post_password = '' AND p.post_status = 'publish' GROUP BY v.postid ORDER BY avg_views DESC LIMIT 5 OFFSET 0; made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/wp-shopkeeper101/page-widgetized.php'), get_template_part, locate_template, load_template, require('/themes/wp-shopkeeper101/content-after.php'), get_sidebar, locate_template, load_template, require_once('/themes/wp-shopkeeper101/sidebar.php'), dynamic_sidebar, call_user_func_array, WP_Widget->display_callback, Sidetabs_Widget->widget, get_template_part, locate_template, load_template, require('/themes/wp-shopkeeper101/featured-sidetabs.php'), wpp_get_mostpopular, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, WPP_Public->wpp_shortcode, WPP_Query->__construct, WPP_Query->run_query
Looked at my tables in each site and none of the sites I’m using WPP on had a column ‘view_datetime’ in them. I tried deactivating and reactivating WPP in each site it is used on and there was no change in the wp_popularpostssummary table for any site. I do not have WPP network activated since I do not need or want it on many of this multi-site’s websites.
At the moment the WPP stats on these sites was not important to me as I’m cleaning them up and making changes so I deleted WPP at the network level and reinstalled the plugin. When I activated it now on the sites I need it on the wp_popularpostssummary was created with the view_datetime column. I don’t know why when I upgraded the network the database updates for WPP did not happen on the sites I was using it on but the only option besides deleting and installing new was to manually run queries on each site it was needed on. I hope you can fix it so this doesn’t continue to be an issue going forward for non-network activated multi-site installs.
I have to update a bunch more sites with WP 4.9 and WPP 4.0.12 but only one other one is a multi-site. I hate to have to run queries on each separate site to make this update work.
Just updated to WordPress 4.9
WordPress Popular Posts 4.0.12
PHP 5.6.28
Theme WP-Shopkeeper v1.0.1 child (though same thing happened with several other themes)
This site active plugins
Bad Behavior Version 2.2.20 Network Active
Ban Hammer Version 2.6 Network Active
Contact Form 7 Version 4.9.1
Easy FancyBox Version 1.6
Ebay Feeds for WordPress Version 1.12
FV Simpler SEO Version 1.6.35 Network Active
Google Analytics for WordPress by MonsterInsights Version 6.2.6 Network Active
Head, Footer and Post Injections Network Active
Link Manager Version 0.1-beta Network Active
Members Version 2.0.2 Network Active
Multisite Enhancements Version 1.4.1 Network Active
Page Tagger Version 0.4.2 Deactivate
PHP Code Widget Version 2.3 Network Active
Share Buttons by AddThis Version 6.1.1
Shield Version 5.16.4 Network Active
Version 2.9.1 | By Vladimir Prelovac | View details
Ultimate Nofollow Version 1.4.7
White Label CMS Version 1.6.1 Network Active
WordPress Importer Version 0.6.3 Network Active
WordPress MU Domain Mapping Version 0.5.5.1 Network Active
WP-PageNavi Version 2.92The page I need help with: [log in to see the link]
- The topic ‘wp_popularpostssummary did not update on multi-site local activate’ is closed to new replies.