• Resolved marbs

    (@marbs)


    Hello Rank Math Support Team,

    I am experiencing a critical issue with the Rank Math Analytics plugin on my WordPress site. The error message indicates that the table wpeq_rank_math_analytics_objects does not exist. Here are the details of the error and the steps I have taken so far:

    Error Message:

    [07-Jun-2024 07:17:15 UTC] WordPress database error Table 'wajrquruej.wpeq_rank_math_analytics_objects' doesn't exist for query SELECT * FROM wpeq_rank_math_analytics_objects WHERE object_id = '20582' LIMIT 0, 1 made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, RankMath\Analytics\Rest->get_post, RankMath\Analytics\Posts->get_post, RankMath\Admin\Database\Query_Builder->one

    Steps Taken:

    1. Checked for the Existence of the Table:
      * I logged into my database via phpMyAdmin and confirmed that the table wpeq_rank_math_analytics_objects does not exist.
    2. Reinstalled Rank Math Plugin:
      * Deactivated and deleted the Rank Math plugin.
      * Reinstalled and activated the plugin.
      * The error persisted.
    3. Attempted Manual Table Creation:
      * Based on typical table structures for analytics plugins, I attempted to create the table manually using the following SQL query:
    CREATE TABLE wpeq_rank_math_analytics_objects (
    id bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
    object_id bigint(20) UNSIGNED NOT NULL,
    type varchar(20) NOT NULL,
    created datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY (id),
    UNIQUE KEY object_id (object_id)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
    • However, I am unsure if this schema is correct for Rank Math.
    • Ran Database Repair:
      * Added define(‘WP_ALLOW_REPAIR’, true); to wp-config.php.
      * Ran the repair and optimization from https://my-site.com/wp-admin/maint/repair.php.
      * Removed the repair line from wp-config.php.
    • Debugging Enabled:
      * Enabled debugging in wp-config.php to gather more information
    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);
    • Additional Information:
      WordPress Version: 6.5.5
      Rank Math Version: 1.0.222
      PHP Version: 8.2
      Database Management Tool: phpMyAdmin
      Hosting Provider: Cloudways
    • Despite these steps, the error persists. I suspect the issue lies with the missing table schema or a conflict during plugin installation.

    Could you please provide guidance on how to correctly create the missing wpeq_rank_math_analytics_objects table or any other steps to resolve this issue?

    Thank you for your assistance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @marbs,
    ?
    Thank you for contacting Rank Math support.
    ?
    You don’t need to create the table manually. Please navigate to?WP Dashboard > Rank Math SEO > Status & Tools > Database Tools?and use the?Recreate Missing Database Tables?tool to recreate the table. If the issue persists, please use the following SQL query to create the table:?https://pastebin.com/HaL1hgkh
    ?
    Please note that your website’s encoding, engine, and table prefix might differ.
    ?
    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Thread Starter marbs

    (@marbs)

    @rankmathsupport thank you

    Yes I tried repair db tool but that did not fixed the issue. All of my websites (including one new installation) use your plugin were experiencing this issue so you must look at this issue.

    However, the create table SQL solved this issue:

    CREATE TABLE IF NOT EXISTS rm_rank_math_analytics_objects (
    id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    created timestamp NOT NULL,
    title text NOT NULL,
    page varchar(500) NOT NULL,
    object_type varchar(100) NOT NULL,
    object_subtype varchar(100) NOT NULL,
    object_id bigint(20) unsigned NOT NULL,
    primary_key varchar(255) NOT NULL,
    seo_score tinyint(4) NOT NULL DEFAULT 0,
    page_score tinyint(4) NOT NULL DEFAULT 0,
    is_indexable tinyint(1) NOT NULL DEFAULT 1,
    schemas_in_use varchar(500) DEFAULT NULL,
    desktop_interactive double DEFAULT 0,
    desktop_pagescore double DEFAULT 0,
    mobile_interactive double DEFAULT 0,
    mobile_pagescore double DEFAULT 0,
    pagespeed_refreshed timestamp NULL DEFAULT NULL,
    PRIMARY KEY (id),
    KEY analytics_object_page (page(190))
    ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @marbs,
    ?
    There must be some limitations on your site that are preventing our plugin from creating the database table. However, we are glad that the SQL query solved the issue.
    ?
    Please do not hesitate to let us know if you need our assistance with anything else.
    ?
    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.