There has been a critical error on this website.

#1101856
  • Resolved csaszari
    Rank Math free

    Hello,

    I get an error on this URL on our website:
    https://buildext.com/en/actual/news/

    All similar URL-s are working fine:
    https://buildext.com/en/actual/blog/
    https://buildext.com/en/actual/career/

    Fatal error: Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, array given in /home2/buildext/public_html/wp-content/plugins/seo-by-rank-math/includes/frontend/paper/class-paper.php:193 Stack trace: #0 /home2/buildext/public_html/wp-content/plugins/seo-by-rank-math/includes/frontend/paper/class-paper.php(193): trim() #1 /home2/buildext/public_html/wp-content/plugins/seo-by-rank-math/includes/frontend/class-head.php(218): RankMath\Paper\Paper->get_description() #2 /home2/buildext/public_html/wp-includes/class-wp-hook.php(324): RankMath\Frontend\Head->metadesc() #3 /home2/buildext/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #4 /home2/buildext/public_html/wp-includes/plugin.php(565): WP_Hook->do_action() #5 /home2/buildext/public_html/wp-content/plugins/seo-by-rank-math/includes/traits/class-hooker.php(90): do_action_ref_array() #6 /home2/buildext/public_html/wp-content/plugins/seo-by-rank-math/includes/frontend/class-head.php(189): RankMath\Frontend\Head->do_action() #7 /home2/buildext/public_html/wp-includes/class-wp-hook.php(324): RankMath\Frontend\Head->head() #8 /home2/buildext/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #9 /home2/buildext/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #10 /home2/buildext/public_html/wp-includes/general-template.php(3192): do_action() #11 /home2/buildext/public_html/wp-content/themes/buildext/header.php(9): wp_head() #12 /home2/buildext/public_html/wp-includes/template.php(810): require_once(‘/home2/buildext…’) #13 /home2/buildext/public_html/wp-includes/template.php(745): load_template() #14 /home2/buildext/public_html/wp-includes/general-template.php(48): locate_template() #15 /home2/buildext/public_html/wp-content/themes/buildext/category.php(2): get_header() #16 /home2/buildext/public_html/wp-includes/template-loader.php(106): include(‘/home2/buildext…’) #17 /home2/buildext/public_html/wp-blog-header.php(19): require_once(‘/home2/buildext…’) #18 /home2/buildext/public_html/index.php(17): require(‘/home2/buildext…’) #19 {main} thrown in /home2/buildext/public_html/wp-content/plugins/seo-by-rank-math/includes/frontend/paper/class-paper.php on line 193

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

    I apologize for the issue you are facing with the critical error on your website. The error message indicates that there is a problem with the trim() function in the Rank Math plugin, where it is receiving an array instead of a string. This can happen due to incorrect data being passed to the function, possibly from a custom field or a plugin conflict.

    To troubleshoot this issue, you can try the following steps:

    1. Check for Plugin Conflicts: Deactivate all other plugins except Rank Math and see if the error persists. If the error goes away, reactivate the plugins one by one to identify which one is causing the conflict.

    2. Theme Conflict: Switch to a default WordPress theme (like Twenty Twenty-One) to see if the issue is related to your current theme.

    3. Update Rank Math: Ensure that you are using the latest version of the Rank Math plugin. Sometimes, bugs are fixed in newer releases.

    4. Clear Cache: If you are using any caching plugins or server-side caching, clear all caches after making changes.

    5. Debugging: Enable WordPress debugging to get more detailed error messages. You can do this by adding the following lines to your wp-config.php file:

      define( 'WP_DEBUG', true );
      define( 'WP_DEBUG_LOG', true );
      define( 'WP_DEBUG_DISPLAY', false );

      After enabling debugging, check the wp-content/debug.log file for more information about the error.

    If these steps do not resolve the issue, please reply to this ticket with any additional details or changes you’ve made, and a human agent from our support team will assist you further.

    Thank you for bringing this to our attention!

    Sources:
    Fatal Error Happening on Some Installations After 1.0.49 Update » Rank Math

    Hello,

    Thank you for reaching out to us.

    Cueing from the error log, it seems the data for the pages that are not working is saved in the database in a serialized format instead of being strings as they should be for the Rank Math meta title and description.

    If you are importing this data from somewhere, please make sure that you import the fields for the title, description and focus keyword as strings and not as arrays in serialized format. You will have to remove the serialized entries for the affected posts from the postmeta table of the database. If you’re not sure, please take a backup of your database and share access to your site following the steps below:

    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.

    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/

    We really look forward to helping you.

    Hello,

    We’re delighted to hear that this issue has been resolved. We appreciate your feedback.

    This ticket will be closed now, but if you ever have another question or need any help in the future, please don’t hesitate to create a new forum topic. We’ll be more than happy to assist you again.

    Thank you.

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

The ticket ‘There has been a critical error on this website.’ is closed to new replies.