WordPress.org

Forums

WordPress Popular Posts
[resolved] [Plugin: WordPress Popular Posts] No Table / Database Created (19 posts)

  1. NanoG5
    Member
    Posted 3 years ago #

    Hi,
    I checked my database but there are no wp_popularpostsdata and wp_popularpostsdatacache created during the plugin installation. I give the user database full permission. I also check my theme and found <?php wp_head(); ?>.
    Server is using lighttpd.
    Any advice would be greatly appreciated.
    Thank you!

    http://wordpress.org/extend/plugins/wordpress-popular-posts/

  2. northlake
    Member
    Posted 3 years ago #

    Using your preferred text editor, open the file wordpress-popular-posts.php. At line 1123, change the entire line from this

    register_activation_hook('WordPressPopularPosts', 'wpp_install');

    to this

    register_activation_hook(__FILE__ , array('WordPressPopularPosts', 'wpp_install'));

    Hope this will help.

  3. NanoG5
    Member
    Posted 3 years ago #

    Hi Northlake,
    Yes it works! Table created and plugin runs smoothly. Do I have to change it back?
    But I still don't understand what cause this problem. I'm using all the latest release for wordpress, theme, and plugins.
    Thank you!

  4. pascaloChines
    Member
    Posted 3 years ago #

    Hi, good that the change works for u NanoG5, only it is a step forward for me as the tables are created with the change on line 1123 but then they are not populated. And I get the same message "Sorry. No data so far." on the admin interface/Wordpress Popular Posts Stats.
    Can someone provide help about it ? I saw this plugin running well on a friend s 3.0 but now with my wordpress 3.2.1 and latest version of plugin it seems it does not work. Thanks in advance !

  5. northlake
    Member
    Posted 3 years ago #

    Yes it works! Table created and plugin runs smoothly. Do I have to change it back?
    But I still don't understand what cause this problem. I'm using all the latest release for wordpress, theme, and plugins.

    You don't have to change it back. I think the main cause is the improper use of registration_activation_hook function. Probably one of the coders of the said plugin thought that the first parameter of the said function is a function callback, not a file, which is according to the documentation.

    And I get the same message "Sorry. No data so far." on the admin interface/Wordpress Popular Posts Stats.
    Can someone provide help about it ? I saw this plugin running well on a friend s 3.0 but now with my wordpress 3.2.1 and latest version of plugin it seems it does not work. Thanks in advance !

    Will do my best to check what's wrong.

  6. northlake
    Member
    Posted 3 years ago #

    pascaloChines,

    Logout first from the admin panel. After logging out, you can browse other posts in the blog you are working with.

    The the said plugin won't count posts when the you are logged-in.

  7. pascaloChines
    Member
    Posted 3 years ago #

    Dear northlake,

    thanks a lot for your help : it works. Guess I was in too much a hurry to see this nice plugin work so I posted to quickly on this forum, just had to wait one night and guess what, you were right !
    Thanks again,

    Pascal

  8. kendimatteoross
    Member
    Posted 3 years ago #

    Hi

    I'm having the same problem.

    I've done the change:

    ...from this

    register_activation_hook('WordPressPopularPosts', 'wpp_install');

    to this

    register_activation_hook(__FILE__ , array('WordPressPopularPosts', 'wpp_install'));

    ... but it still does not work.

    I've also checked the following

    header.php andit is OK.

    Don't understand the "is the "admin folder" password protected. Aren't they all. I need to have a password at mydomain.com/wp-admin. This cannot be the folder you mean right so...

  9. David Borrink
    Member
    Posted 3 years ago #

    Using your preferred text editor, open the file wordpress-popular-posts.php. At line 1123, change the entire line from this

    register_activation_hook('WordPressPopularPosts', 'wpp_install');

    to this

    register_activation_hook(__FILE__ , array('WordPressPopularPosts', 'wpp_install'));

    I made this change, too, this morning, and I also checked my database to see if the proper tables were set up and I see no wp_popularpostsdata and wp_popularpostsdatacache. So I'm not sure what to do now. If there are no tables created, then I know it's not going to work even if I wait 24 hours.

  10. northlake
    Member
    Posted 3 years ago #

    @kendimatteoross and @DavidBorrink,

    I forgot one essential step: you have to deactivate the plugin first before changing the code! After making changes, you can reactivate the plugin.

    In case you already made changes, you may deactivate the said plugin and reactivate it again.

    Sorry!

  11. David Borrink
    Member
    Posted 3 years ago #

    @northlake,

    Aha! Like so many computer issues, "rebooting" cures so many things, it's amazing. I now see those two tables on my database. Thank you! Now we should see something soon.

    Thank you!

  12. kendimatteoross
    Member
    Posted 3 years ago #

    Thanks.

    In the end however, I found http://wordpress.org/extend/plugins/top-10/

    Which does pretty much exactly the same thing but started to work the minute I installed it.

  13. ctechrocks
    Member
    Posted 3 years ago #

    Thanks DavidBorrink!

  14. Marty
    Member
    Posted 3 years ago #

    @northlake

    U R Da Man! I thought all was lost with this plugin until your helping hand reached out... all is working as the clever developer intended!

    Thanks again!!! :-)

  15. kayrules
    Member
    Posted 3 years ago #

    Thanks @northlake, you saved my day ! ;D

  16. Héctor Cabrera
    Member
    Plugin Author

    Posted 3 years ago #

    @northlake, thanks for posting this fix. I'm adding this patch to the next release of WPP. Good catch!

  17. jeremyers1
    Member
    Posted 3 years ago #

    @northlake,

    Thank you for the fix! I was banging my head against this all day, and your solution fixed the problem.

  18. petethechop
    Member
    Posted 3 years ago #

    How soon can we expect to see this fix in the official release? I hate hacking plugin code because next update wipes it out.

  19. Héctor Cabrera
    Member
    Plugin Author

    Posted 3 years ago #

    The update should be up today, Pete.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress Popular Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic