WP Power Stats
[resolved] Database errors on multisite (5 posts)

  1. J.D. Grimes
    Posted 2 years ago #

    I have a client running this plugin on a multisite install. It is version 3.7.1, and running version 1.0.2 of your plugin. (I know that neither of those are the latest version, but I've looked at the code and I think the issues reported below are still relevant for the latest versions.) We are having errors like this in the error log:

    [31-Dec-2013 20:41:32 UTC] WordPress database error Table 'db.prefix_power_stats_pageviews' doesn't exist for query UPDATE prefix_power_stats_pageviews SET <code>hits</code> = <code>hits</code> + 1 WHERE <code>date</code> = '2013-12-31' made by shutdown_action_hook, do_action('shutdown'), call_user_func_array, power_stats_init, PowerStats->__construct, PowerStats->log_pageviews

    In short, the database table it is trying to write to does not exist. I think that possibly this is due to a problem in the installation code. There is this line in wp_power_stats_activate():

    if ($networkwide) {

    However, $networkwide is not defined anywhere, so this will always be false.

    In essence, the installation is not being performed correctly on multisite.


  2. artifex404
    Plugin Author

    Posted 2 years ago #

    Thank you so much for your report! Yes, the issue is still relevant. The bug will be fixed in the next version of the plugin.

  3. J.D. Grimes
    Posted 2 years ago #

    You are welcome. Thank you for the quick response.

  4. artifex404
    Plugin Author

    Posted 2 years ago #

    This issue has been fixed (as of version 1.1).

  5. Michael Beckwith
    Posted 1 year ago #

    It seems that you have it fixed for multisite, but only when network activated. When in a multisite and activating for a specific sub site, the tables aren't getting created. Worth checking on.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Power Stats
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic