Hey @gestaltio!
Seems like WPP failed to upgrade its database tables. Try visiting the Dashboard area of each site to force the upgrade and check again. If that doesn’t work, try running these queries for every site on the network instead.
Hey Hector,
Thanks so much for the quick response. I tried running the queries you suggested, but they all resulted in errors in MySQL.
As a second step to try to clean out the DB, I uninstalled the plugin entirely, and reinstalled. This fixed the DB issue (and I’m seeing popular posts again).
Out of curiosity, is there something I can do to be sure this doesn’t happen again in the future? Right now we don’t have too much popular posts data, but as it grows, losing it would be a bigger issue.
-
This reply was modified 8 years, 6 months ago by
gestaltio.
It’s a little bit difficult to tell what’s going on without more details from you (some actual code, widget/shortcode settings, etc).
Out of curiosity, is there something I can do to be sure this doesn’t happen again in the future? Right now we don’t have too much popular posts data, but as it grows, losing it would be a bigger issue.
You could have renamed WPP’s tables, reinstall the plugin and reimport the data. If you made a backup prior to running the DB queries like I suggested, then you should be able to get your data back 😉
I made a backup of the DB before running the queries, but I’m hesitant to re-import data that was faulty / causing troubles – seems like it might just reintroduce the issue.
All of the code running is mentioned above – the combination of the wpp_post filter almost exactly copied from your documentation, and this:
`<?php
switch_to_blog( $mfc_city_active );
$args = array(
‘post_type’ => ‘tribe_events’,
‘limit’ => 4,
);
wpp_get_mostpopular( $args );
restore_current_blog();
?>`
I made a backup of the DB before running the queries, but I’m hesitant to re-import data that was faulty / causing troubles – seems like it might just reintroduce the issue.
You didn’t say what the problem was but it shouldn’t be an issue, and even if it were you could just delete the tables and reinstall WPP. So don’t worry about it, give it a shot.
Regarding your code, try this:
<?php
switch_to_blog( $mfc_city_active );
$args = array(
'post_type' => 'tribe_events',
'limit' => 4,
'stats_date' => 1
);
wpp_get_mostpopular( $args );
restore_current_blog();
?>
I commented here since I didn’t know what the problem was 😀 … if I knew what it was I likely wouldn’t have bothered you.
I’ll look into the ‘stats_date’ parameter. Thanks.
Don’t sweat it, I’m glad to be of help 🙂