• Resolved larnellc

    (@larnellc)


    I get an error when trying to precache my site.

    WordPress database error Table ‘abc_websites.abc__blogs’ doesn’t exist for query SELECT * FROM abc__blogs ORDER BY blog_id made by do_action_ref_array, call_user_func_array, WP_FFPC->precache_coldrun.

    I have network that uses a domain mapping plugin to map subsites.
    Could this also be the reason I’ve never seen a precache log? I have never had the option to specify one.
    I logged into mysql and verified the table and data does exist.

    In mysql the data is organized like so:

    SQL query: SELECT * FROM abc_blogs LIMIT 0, 30 ;
    Blog_id site_id domain path public
    1 1 apples.org / 0
    2 1 apples.org /varieties/ 0
    3 1 apples.org /recipes/ 1

    Ideas?

    https://www.ads-software.com/plugins/wp-ffpc/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi Peter,

    I’m having the same exact error as described above, though on a multisite dev server with only one site currently registered (more to come once the environment is fully configured). As with larnellc, I also checked and can verify that account.db_db.blogs does exist, but also noticed that the error log shows a double__underscore between the db and table name, versus a single_underscore as shown in phpMyAdmin…

    phpMyAdmin datatable prefix & name (example): db_blogs

    error log datatable prefix & name (example): db__blogs

    I’d assume that custom database and datatable prefixes are supported, correct?

    Not sure if this is directly related to WP-FFPC, only that it appears to not be isolated to just one user, and as a result is preventing the precache from executing. Any thoughts on what might be throwing the error or suggestions on what mods we can try to force the precache build since we know that the _blogs table exists?

    Thanks in a advance!

    Plugin Author petermolnar

    (@cadeyrn)

    Hi,

    (previous comment deleted, because I do have an sql query)
    I’ll look into this.

    Plugin Author petermolnar

    (@cadeyrn)

    Could you please change:
    the line

    $pfix = empty ( $wpdb->base_prefix ) ? 'wp' : $wpdb->base_prefix;
    to
    $pfix = empty ( $wpdb->base_prefix ) ? 'wp_' : $wpdb->base_prefix;

    on
    https://github.com/petermolnar/wp-ffpc/blob/1.7.7/wp-ffpc-class.php#L1145

    and
    $blog_list = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM ". $pfix ."_blogs ORDER BY blog_id", '' ) );
    to
    $blog_list = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM ". $pfix ."blogs ORDER BY blog_id", '' ) );
    on
    https://github.com/petermolnar/wp-ffpc/blob/1.7.7/wp-ffpc-class.php#L1146

    please?
    I believe that is the issue.

    I gave it a shot, but unfortunately no dice…

    Fatal error: Call to undefined method WP_FFPC::_site_url() in /home/server/public_html/wp-content/plugins/wp-ffpc/wp-ffpc-class.php on line 1180

    Plugin Author petermolnar

    (@cadeyrn)

    I meant to do it on your installed version; that version on github is a bit messy I was only using it as a reference.

    I understood your instructions, Peter; loaded wp-ffpc-class.php into Notepad++ from a fresh download of v1.7.7 directly from the wp-repo, modified lines 1145 & 1146 as instructed, and uploaded the revised file to the server. Went back into network admin, reactivated WP-FFPC, saved settings (APCu), and received the fatal error after clicking precache.

    Plugin Author petermolnar

    (@cadeyrn)

    This should be sorted in 1.8.2; could you please come back to me with the results?

    Confirming that v1.8.2 resolves the fatal error issue. Tested in multisite with 4 blogs, precache ran flawlessly, and no errors encountered when clearing/rebuilding cache or switching between APCu and Memcached handlers. Well done, Peter!

    Plugin Author petermolnar

    (@cadeyrn)

    Thank you for the test and for the feeback!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘WordPress database error Table doesn't exist.’ is closed to new replies.