• Resolved gestaltio

    (@gestaltio)


    Hi there,

    I love this plugin – helping me spice up my sidebar.

    I am using the plugin to output location-specific events (a custom post type) in the sidebar. I use switch_to_blog() to switch to the site, and then output the popular events. It was working before I updated the plugin (4.0.12) + WP (4.8.3) but now only shows “Sorry. No data so far.” no matter what I try.

    Any tips? It was definitely working with my setup very recently (last 24 hours), although I can’t say for certain the plugin / WP update was when things changed.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    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.

    Thread Starter gestaltio

    (@gestaltio)

    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 7 years, 4 months ago by gestaltio.
    Plugin Author Hector Cabrera

    (@hcabrera)

    It’s a little bit difficult to tell what’s going on without more details from you (some actual code, widget/shortcode settings, etc).

    Plugin Author Hector Cabrera

    (@hcabrera)

    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 ??

    Thread Starter gestaltio

    (@gestaltio)

    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();
    ?>`

    Plugin Author Hector Cabrera

    (@hcabrera)

    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();
    ?>
    Thread Starter gestaltio

    (@gestaltio)

    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.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Don’t sweat it, I’m glad to be of help ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WP Popular Posts + Multisite’ is closed to new replies.