Got error ‘PHP message: PHP Fatal error: Uncaught TypeError:

#869514
  • Resolved Eighty8
    Rank Math pro

    Hi

    When accessing the redirects page I receive an email from WP stating the website has experienced errors.

    The redirect page displays this at the end:

    There has been a critical error on this website. Please check your site admin email inbox for instructions.

    Learn more about troubleshooting WordPress.

    The server error logs show the following:

    [error] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /home/sites/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-table.php:191\nStack trace:\n#0 /home/sites/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-table.php(152): RankMath\\Redirections\\Table->get_source_html(‘a’, Array, Array)\n#1 /home/sites/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-table.php(86): RankMath\\Redirections\\Table->get_sources_html(Array)\n#2 /home/sites/public_html/wp-admin/includes/class-wp-list-table.php(1797): RankMath\\Redirections\\Table->column_sources(Array)\n#3 /home/sites/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-table.php(375): WP_List_Table->single_row_columns(Array)\n#4 /home/sites/public_html/wp-admin/includes/class-wp-list…’

    The email contains the following:

    Error Details
    =============
    An error of type E_ERROR was caused in line 191 of the file /home/sites/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-table.php. Error message: Uncaught TypeError: Cannot access offset of type string on string in /home/sites/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-table.php:191
    Stack trace:
    #0 /home/sites/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-table.php(152): RankMath\Redirections\Table->get_source_html(‘a’, Array, Array)
    #1 /home/sites/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-table.php(86): RankMath\Redirections\Table->get_sources_html(Array)
    #2 /home/sites/public_html/wp-admin/includes/class-wp-list-table.php(1797): RankMath\Redirections\Table->column_sources(Array)
    #3 /home/sites/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/class-table.php(375): WP_List_Table->single_row_columns(Array)
    #4 /home/sites/public_html/wp-admin/includes/class-wp-list-table.php(1727): RankMath\Redirections\Table->single_row(Array)
    #5 /home/sites/public_html/wp-admin/includes/class-wp-list-table.php(1712): WP_List_Table->display_rows()
    #6 /home/sites/public_html/wp-admin/includes/class-wp-list-table.php(1639): WP_List_Table->display_rows_or_placeholder()
    #7 /home/sites/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/redirections/views/main.php(51): WP_List_Table->display()
    #8 /home/sites/public_html/wp-content/plugins/seo-by-rank-math/includes/admin/class-page.php(272): include_once(‘/home/sites/…’)
    #9 /home/sites/public_html/wp-includes/class-wp-hook.php(324): RankMath\Admin\Page->display(”)
    #10 /home/sites/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array)
    #11 /home/sites/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #12 /home/sites/public_html/wp-admin/admin.php(259): do_action(‘rank-math_page_…’)
    #13 {main}
    thrown

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 there’s a corrupted redirection, for which it is throwing a critical error.

    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/

    Also, make a complete backup of your database, and after this, install the PHPMyadmin to access your website’s database for the corrupted redirect entry.

    You may get in touch with your web host to access your website’s database.

    Let us know how this goes.

    Hi, After backing up the database and recreating the missing database tables, the error:

    There has been a critical error on this website. Please check your site admin email inbox for instructions.

    is still visible on the page: wp-admin/admin.php?page=rank-math-redirections towards the bottom of the redirects setup on the website.

    Hello,

    That indicates that there’s an entry in the database table that is not serialized causing this issue when we try to access its data.

    The only way around this issue would be to delete the incorrect entry on the database directly.

    If you are not familiar with serialized data please provide working WordPress credentials so our team can do the needful and correct the error.

    Thank you.

    Thank you. the issue is now resolved.

    Hello,

    Glad that everything is sorted.

    Don’t hesitate to get in touch if you have any other questions.

    We are here to help!

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

The ticket ‘Got error ‘PHP message: PHP Fatal error: Uncaught TypeError:’ is closed to new replies.