cannot import – critical error

#1046918
  • Resolved John
    Rank Math free

    I am trying to import the Rank Math json file from another site and it leads to a critical error every time. We have tried a number of workarounds and nothing is working.

    We have tried to import the json in pieces, and all of it as a whole. We made a duplicate clone of the original site and tried that with separate export / import. We thought it might be a PHP issue so we confirmed the PHP version is the same on both sites. We tried deactivating plugins and going to the wordpress default theme.

    I’ll include the logins for each of the sites so you can help me troubleshoot.

    Here is the error it generates in a popup:
    <p>There has been a critical error on this website.</p><p>Learn more about troubleshooting WordPress.</p>

Viewing 5 replies - 16 through 20 (of 20 total)
  • John
    Rank Math free

    I did that weeks ago, and I think I stated that early in the support ticket. My webhost actually wrote a patch to the Rank Match plugin!!! And got it working. Incredible support from them, above and beyond.

    This just shouldn’t happen — it’s not normal for a webhost to patch for a plugin. That’s the job of Rank Math.

    And while I never had an issue previously with Rank Math, this entire experience has been very disappointing. You guys might want to hire better programmers!!!

    Here’s the info from the webhost:
    The upload was failing due to wp_handle_upload() not being loaded when Rank Math tries to use it. This function is defined in wp-admin/includes/file.php, which isn’t loaded by default on the frontend or in REST API calls.

    I added a conditional include for file.php inside RankMath’s handle_file_upload() function, and the import worked without issue.

    [st703email@host kh2025068h7wcc.studio703.com]$ diff /home/st703email/kh2025068h7wcc.studio703.com/wp-content/plugins/seo-by-rank-math/includes/helpers/class-wordpress.php /home/st703email/kh2025068h7wcc.studio703.com/wp-content/plugins/seo-by-rank-math/includes/helpers/class-wordpress.php.KH2025068H7WCC
    763,765d762
    < if ( ! function_exists( ‘wp_handle_upload’ ) ) {
    < require_once ABSPATH . ‘wp-admin/includes/file.php’;
    < }
    I have patched wp-content/plugins/seo-by-rank-math/includes/helpers/class-wordpress.php on the live site as well .

    [st703email@host www]$ cp wp-content/plugins/seo-by-rank-math/includes/helpers/class-wordpress.php wp-content/plugins/seo-by-rank-math/includes/helpers/class-wordpress.php.KH2025068H7WCC
    [st703email@host www]$ nano +769 wp-content/plugins/seo-by-rank-math/includes/helpers/class-wordpress.php
    [st703email@host www]$ diff wp-content/plugins/seo-by-rank-math/includes/helpers/class-wordpress.php wp-content/plugins/seo-by-rank-math/includes/helpers/class-wordpress.php.KH2025068H7WCC
    763,766d762
    < if ( ! function_exists( ‘wp_handle_upload’ ) ) {
    < require_once ABSPATH . ‘wp-admin/includes/file.php’;
    < }
    <

    Hello,

    We have shared this with our developers. We will get back to you once we have an update or solution from them.

    In the meantime, don’t hesitate to reach out if you need assistance with anything else.

    Thank you.

    Hello,

    We have identified the source of this issue and it has been logged, so that a fix can be included in an upcoming release.

    We apologize for any inconveniences that might have been caused as a result of this issue.

    Thank you.

    John
    Rank Math free

    Ok thank you. We can mark this ticket as resolved.

    Hello,

    We are glad we could address your concern.

    Please feel free to create a new forum topic if you do have another question in the future.

    It will be our pleasure to assist you again.

    Thank you.

Viewing 5 replies - 16 through 20 (of 20 total)

The ticket ‘cannot import – critical error’ is closed to new replies.