• Resolved little sister piggy

    (@little-sister-piggy)


    Hi. On desktops and mobile devices, I’m getting these error messages above posts (if they are listed in the Top 10 as shown in the right sidebar)

    Warning: array_key_exists() expects parameter 2 to be array, null given in /home/piggys7/public_html/wp-content/plugins/top-10/top-10.php on line 231
    
    Warning: array_key_exists() expects parameter 2 to be array, null given in /home/piggys7/public_html/wp-content/plugins/top-10/top-10.php on line 261

    What’s up with that? It’s never done it before. I would hate to deactivate Top 10 because I LOVE IT!
    site: http://www.piggysisters.com
    Thanks,
    Patty

    https://wordpress.org/plugins/top-10/

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

    (@ajay)

    Hi,

    Since when have you been seeing this error? I visited your site but I don’t see it.

    Could you please try the following:

    1. Reset the options to default hitting the button at the bottom of the screen. Before doing so, if you have any custom styles, please save them first (e.g. in a notepad file)

    2. If this doesn’t solve the problem, please deactivate and then delete the plugin via WordPress / Plugins.
    Once done, please reinstall a fresh copy of the plugin via WordPress/Plugins/Add New

    Thread Starter little sister piggy

    (@little-sister-piggy)

    Ajay,
    The reason you didn’t see the problem is that I had deactivated the plug-in … couldn’t let it stay up with huge warnings above. I deleted, including the new update from yesterday, (from my plug-ins page), and installed a fresh copy. Unfortunately – same problem.
    Can you get further into my site to download the plug in yourself and see what I see? I am pretty desperate to get this AWESOME, PERFECT Top 10 back up. I hope you can help, Ajay.
    Patty
    http://www.piggysisters.com

    Plugin Author Ajay

    (@ajay)

    Patty,

    I’ve not been able to replicate this issue on any of my sites. It means that the $wp variable isn’t be set properly.

    Could you please edit the top-10.php file and change line 225:

    From:

    global $wpdb, $tptn_settings;

    to:

    global $wpdb, $tptn_settings;
    if ( empty( $wp ) ) {
    global $wp;
    }

    Thread Starter little sister piggy

    (@little-sister-piggy)

    That did it! Thank you very much. Good support; I will note it in my “new” review
    Patty

    Plugin Author Ajay

    (@ajay)

    Thank you for the review. I’ll also put this in my plugin for the next version release.

    Hi! I’m having the exact smae problem, but for some reason editing the top-10.php file does not work. Hope you can help!

    Thanks – F

    Plugin Author WebberZone

    (@webberzone)

    Hi,

    Could you please change to code as this:

    global $wpdb, $tptn_settings;
    
    if ( ! $wp->is_main_query() ) {
    return;
    }
    
    if ( empty( $wp ) ) {
    global $wp;
    }

    After you’ve changed this, could you please check that the tracking is working well?

    Plugin Author WebberZone

    (@webberzone)

    Hi,

    Please do not make the change above. Could you please try this code and let me know if it works and also if the tracking works fine.

    global $wpdb, $tptn_settings;
    
    	if ( empty( $wp ) ) {
    		global $wp;
    	}
    
    	if ( ! isset( $wp->query_vars ) || ! is_array( $wp->query_vars ) ) {
    		return;
    	}
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Warnings at top of pages with code pointing to Top 10’ is closed to new replies.