Assistance Required: Too Many Redirects & PHP Fatal Error with Rank Math SEO

#934702
  • Tomas
    Rank Math free
    Content AI Starter

    Dear Rank Math Support Team,

    I am experiencing a critical issue with the Rank Math SEO plugin on my website http://www.extraprivlac.sk. When the plugin is enabled, my site encounters a too many redirects issue and a PHP fatal error. These problems disappear as soon as the plugin is deactivated. Even when I disable the Redirections module within Rank Math, the problem persists.

    Here are the details of the error from WordPress:
    Error Details
    ============
    Error Type: E_ERROR
    File: /www/doc/www.extraprivlac.sk/www/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-db.php
    Line: 50

    Error Message:
    Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /www/doc/www.extraprivlac.sk/www/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-db.php:50

    Stack Trace:
    #0 /www/doc/www.extraprivlac.sk/www/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-db.php(50): array_map(Object(Closure), NULL)
    #1 /www/doc/www.extraprivlac.sk/www/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-table.php(337): RankMath\Redirections\DB::get_counts()
    #2 /www/doc/www.extraprivlac.sk/www/wp-admin/includes/class-wp-list-table.php(510): RankMath\Redirections\Table->get_views()
    #3 /www/doc/www.extraprivlac.sk/www/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/views/main.php(50): WP_List_Table->views()
    #4 /www/doc/www.extraprivlac.sk/www/wp-content/plugins/seo-by-rank-math/includes/admin/class-page.php(272): include_once(‘/www/doc/www.ex…’)
    #5 /www/doc/www.extraprivlac.sk/www/wp-includes/class-wp-hook.php(324): RankMath\Admin\Page->display(”)
    #6 /www/doc/www.extraprivlac.sk/www/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array)
    #7 /www/doc/www.extraprivlac.sk/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #8 /www/doc/www.extraprivlac.sk/www/wp-admin/admin.php(259): do_action(‘rank-math_page_…’)
    #9 {main}
    thrown

    Steps Taken So Far:

    1. Disabled the entire plugin: This resolves the issue.
    2. Disabled the Redirections module: The issue persists even with this module off.

    My Request:

    1. Can you help identify the root cause of the issue?
    2. Is there a fix or workaround for the PHP error mentioned above?
    3. How should I proceed to prevent this issue from reoccurring while keeping the plugin functional?

    Your assistance would be greatly appreciated, as this issue is impacting the functionality of my site.

    Thank you in advance for your help!

    Best regards
    Tomas

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    From the error log, it seems that the Redirections tables were not created in your site’s database.

    Please check if the issues get fixed by re-creating the missing database tables.

    You can re-create them by going to WordPress Dashboard > Rank Math > Status & Tools > Database Tools.

    Here’s a guide that you can follow:
    https://rankmath.com/kb/recreate-missing-database-tables/

    Let us know how this goes.

    I’m having this same issue too. All products redirecting endlessly back to themselves and only solution is to deactivate RankMath. It’s been like this for the past 2 days.

    Tomas
    Rank Math free
    Content AI Starter

    Dear Rank Math Support Team,

    Thank you for your prompt response and guidance. I followed the steps provided in your guide and successfully re-created the missing database tables via WordPress Dashboard > Rank Math > Status & Tools > Database Tools.

    Unfortunately, the issue persists even after performing this action. When I attempt to use the Redirections module, I still encounter the same errors.

    I have error in redirections tab too

    Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /www/doc/www.extraprivlac.sk/www/wp-content/plugins/seo-by-rank-math/includes/modules/ redirections/class-db.php:50 Stack trace: #0 /www/doc/www.extraprivlac.sk/www/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-db.php(50): array_map(Object(Closure),
    NULL) #1 /www/doc/www.extraprivlac.sk/www/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-table.php(337): RankMath\Redirections\DB::get_counts) #2 /www/doc/ http://www.extraprivlac.sk/www/wp-admin/includes/class-wp-list-table.php(510): RankMath\Redirections\Table->get_views) #3 /www/doc/www.extraprivlac.sk/www/wp-content/plugins/seo-by-rank-math/
    includes/modules/redirections/views/main.php(50): WP_List_Table->views) #4 /www/doc/www.extraprivlac.sk/www/wp-content/plugins/seo-by-rank-math/includes/admin/class-page.php(272): include_once(‘/www/doc/www.ex…’) #5 /www/doc/www.extraprivlac.sk/www/wp-includes/class-wp-hook.php(324): RankMath\Admin\Page->display(“) #6 /www/doc/www.extraprivlac.sk/www/wp-
    includes/class-wp-hook.php(348): WP_Hook->apply_filters(“, Array) #7 /www/doc/www.extraprivlac.sk/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #8 /www/doc/
    http://www.extraprivlac.sk/www/wp-admin/admin.php(259): do_action(‘rank-math_page_..’) #9 {main} thrown in /www/doc/www.extraprivlac.sk/www/wp-content/plugins/seo-by-rank-math/includes/
    modules/redirections/class-db.php on line 50

    Hello @tomas-7630,

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.

    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    Looking forward to helping you.

    Thank you.

    Hello @tinypiny,

    Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.

    We already released an update where the issue has been fixed: https://rankmath.com/changelog/free/

    After updating the free version of the Rank Math plugin to the latest version (v1.0.234.1), please clear your website cache and see if that works for you.

    If you are unable to see an update, please clear Rank Math’s transients from WP Dashboard > Rank Math > Status & Tools > Database Tools > Remove Rank Math Transients: https://rankmath.com/kb/rank-math-status-and-tools/#rank-math-transients

    Let us know how it goes. Looking forward to helping you.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this ticket.