cabrerahector / wordpress-popular-posts

WordPress Popular Posts - A highly customizable WordPress widget that displays your most popular posts.
https://wordpress.org/plugins/wordpress-popular-posts/
GNU General Public License v2.0
279 stars 83 forks source link

v4 throws PHP notices with WP_DEBUG true #117

Closed rahulv3a closed 7 years ago

rahulv3a commented 8 years ago

Notice: Undefined index: ajax in PATH_TO\wp-content\plugins\wordpress-popular-posts-wpp4\includes\class-wordpress-popular-posts-widget.php on line 34

Notice: Undefined index: css in PATH_TO\wp-content\plugins\wordpress-popular-posts-wpp4\public\class-wordpress-popular-posts-public.php on line 79

cabrerahector commented 8 years ago

Hey there!

I was unable to trigger this warning with a freshly installed WordPress, WPPv4 and WP_DEBUG enabled. Did you install v4 on top of v3?

rahulv3a commented 8 years ago

I had removed v3 and added v4 in the same WordPress site on localserver.

cabrerahector commented 8 years ago

Alright, I'll install v3 first, uninstall it (when you say removed v3 it means you uninstalled it the standard way, right?), then install v4 and see if I can reproduce this.

rahulv3a commented 8 years ago

I didn't uninstall the standard way. I just removed the directory. WordPress disabled it by itself.

cabrerahector commented 8 years ago

Alright, here's what I tried:

  1. Removed v4.
  2. Installed v3 from WordPress' repo.
  3. Set a few options for the widget.
  4. Removed v3 by deleting its folder from the plugins directory.
  5. Checked the Plugins page and got the "The plugin wordpress-popular-posts/wordpress-popular-posts.php has been deactivated due to an error: Plugin file does not exist" message from WordPress.
  6. Pasted v4 into the plugins directory.
  7. Checked the Plugins page and activated v4.

After that, both indexes (ajax and css) are defined and no PHP notices are thrown. Anything else I should try?

rahulv3a commented 8 years ago

That's weird. I'll try to reproduce it later tonight. Will let you know how it goes.

cabrerahector commented 8 years ago

Thanks, please keep me posted with your findings.

cabrerahector commented 7 years ago

Since it's been a while and there hasn't been any updates on this from the OP or someone else I'm closing this topic for the time being.