• Resolved Mark Howells-Mead

    (@markhowellsmead)


    Iā€™m getting the following error message from time to time in a MultiSite installation. The shell script is run every five minutes, but the message is only sent to me via email irregularly. Everything is up-to-date, including WP CLI.

    See also https://www.ads-software.com/support/topic/wordpress-database-error-wpcq-users-table-missing/, which was closed a very short time after this issue was initially raised.

    WordPress database error Table 'sayhello_wp_2022.wpcq_2_users' doesn't exist for query 
    SELECT indexable_table.object_id
    FROM wpcq_2_yoast_indexable indexable_table
    LEFT JOIN wpcq_2_users AS source_table
    ON indexable_table.object_id = source_table.ID
    WHERE source_table.ID IS NULL
    AND indexable_table.object_id IS NOT NULL
    AND indexable_table.object_type = 'user'
    LIMIT 1000 made by include('phar:///usr/local/bin/wp/php/boot-phar.php'), include('phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php'), WP_CLI\bootstrap, WP_CLI\Bootstrap\LaunchRunner->process, WP_CLI\Runner->start, WP_CLI\Runner->run_command_and_exit, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}, call_user_func, Cron_Event_Command->run, Cron_Event_Command::run_event, do_action_ref_array('wpseo_start_cleanup_indexables'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Cleanup_Integration->run_cleanup, Yoast\WP\SEO\Integrations\Cleanup_Integration->Yoast\WP\SEO\Integrations\{closure}, Yoast\WP\SEO\Integrations\Cleanup_Integration->clean_indexables_for_object_type_and_source_table
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Mark Howells-Mead

    (@markhowellsmead)

    I have carried out the suggestion raised by @maybellyne. As this is a multisite installation: do I need to carry out these steps for every site in the installation? The Tools panel is not available at network level.

    @markhowellsmead and @maybellyne I have the same issue with a WordPress multisite.

    I feel the suggestion of @maybellyne in the other thread is not very useful.

    Looking into the plugin code, there is a bug for multisite installs:

    File src/integrations/cleanup-integration.php queues a cleanup task for user indexes without a user (search for clean_orphaned_user_indexables_without_wp_user in that file).

    The code run does not account for the fact that in a multisite environment there is only one user table (eg. wp_users) and tries to join a non-existent users table (eg. wp_2_users).

    I guess the clean method Cleanup_Integration::clean_indexables_for_object_type_and_source_table should either handle the users table for multisite differently or there should be a separate cleanup function for the users table that takes multisite into account.

    Hope this helps fix things quickly,
    Joost

    Thanks for bringing this issue to our attention, @markhowellsmead and @joostdekeijzer. We’ve been able to reproduce the issue in our testing environment and created a bug report for our developers. As it’s a confirmed bug I’ll close this forum topic. Feel free to follow the progress of the report on the above link.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress database error ā€“ WPCQ users table missing’ is closed to new replies.