Cannot access offset of type string on string – class-image.php on line 522

#573965
  • Resolved Anonymous
    Rank Math free

    Hi,

    I have exported my elementor pages to a new website, that means exporting all elementor elements and importing to the new site. All was ok, after activating Rank Math I am getting below exception:

    IE: https://unestilodevida.orem.com.mx/landing-newletterprod/

    This one is working after I created a new page and reimported it: https://unestilodevida.orem.com.mx/linktreee-nuevo-mayo2023/

    I have provided admin privileges in case you wish to review.

    Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /www/unestilodevida_393/public/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php:522 Stack trace: #0 /www/unestilodevida_393/public/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php(497): RankMathOpenGraphImage->set_content_image(Object(WP_Post)) #1 /www/unestilodevida_393/public/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php(321): RankMathOpenGraphImage->set_singular_image() #2 /www/unestilodevida_393/public/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php(81): RankMathOpenGraphImage->set_images() #3 /www/unestilodevida_393/public/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-facebook.php(266): RankMathOpenGraphImage->__construct(Object(RankMathOpenGraphFacebook), Object(RankMathOpenGraphFacebook)) #4 /www/unestilodevida_393/public/wp-includes/class-wp-hook.php(308): RankMathOpenGraphFacebook->image(Object(RankMathOpenGraphFacebook)) #5 /www/unestilodevida_393/public/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #6 /www/unestilodevida_393/public/wp-includes/plugin.php(565): WP_Hook->do_action(Array) #7 /www/unestilodevida_393/public/wp-content/plugins/seo-by-rank-math/includes/traits/class-hooker.php(88): do_action_ref_array(‘rank_math/openg…’, Array) #8 /www/unestilodevida_393/public/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-opengraph.php(74): RankMathOpenGraphOpenGraph->do_action(‘opengraph/faceb…’, Object(RankMathOpenGraphFacebook)) #9 /www/unestilodevida_393/public/wp-includes/class-wp-hook.php(308): RankMathOpenGraphOpenGraph->output_tags() #10 /www/unestilodevida_393/public/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #11 /www/unestilodevida_393/public/wp-includes/plugin.php(565): WP_Hook->do_action(Array) #12 /www/unestilodevida_393/public/wp-content/plugins/seo-by-rank-math/includes/traits/class-hooker.php(88): do_action_ref_array(‘rank_math/head’, Array) #13 /www/unestilodevida_393/public/wp-content/plugins/seo-by-rank-math/includes/frontend/class-head.php(156): RankMathFrontendHead->do_action(‘head’) #14 /www/unestilodevida_393/public/wp-includes/class-wp-hook.php(308): RankMathFrontendHead->head(”) #15 /www/unestilodevida_393/public/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #16 /www/unestilodevida_393/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #17 /www/unestilodevida_393/public/wp-includes/general-template.php(3049): do_action(‘wp_head’) #18 /www/unestilodevida_393/public/wp-content/plugins/elementor/modules/page-templates/templates/canvas.php(19): wp_head() #19 /www/unestilodevida_393/public/wp-includes/template-loader.php(106): include(‘/www/unestilode…’) #20 /www/unestilodevida_393/public/wp-blog-header.php(19): require_once(‘/www/unestilode…’) #21 /www/unestilodevida_393/public/index.php(17): require(‘/www/unestilode…’) #22 {main} thrown in /www/unestilodevida_393/public/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php on line 522

Viewing 10 replies - 1 through 10 (of 10 total)
  • Anonymous
    Rank Math free

    I left Rank math disable so my team can work, if you connect to the site, please leave enable to treoubleshoot but keep it disabled if no fix is provided.

    Hello,

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

    This looks like a known fatal error on PHP 8.0 or higher that had been fixed in previous updates. You can also follow this troubleshooting guide to check if this is a plugin or theme conflict: https://rankmath.com/kb/check-plugin-conflicts/

    If that doesn’t help, please let us know the specific steps to reproduce the error. Upon accessing your admin dashboard and the homepage the error wasn’t generated there.

    Looking forward to helping you.

    Anonymous
    Rank Math free

    Hi Kumar,

    As mentioned in my previous comment, you will have to enable the rank math plugin in order to recreate the issue, and disable the same after troubleshooting, since my team is working on the site.

    Thanks

    Hello,

    As you have imported Elementor elements from old website, would you please confirm if you were using Rank Math in the old website as well? If yes, please import the meta data of those Elementor templates to the new website.

    The error that you’re receiving now is due to filter when the Opengraph cache runs. So, I would suggest please import the meta data for Elementor templates / elements and see if that resolves the issues.

    You can read more about it here: https://rankmath.com/kb/import-export-settings/

    Let us know how it goes.

    Looking forward to helping you.

    Thank you

    Anonymous
    Rank Math free

    Hi Kumar,

    Yes the source webiste was running Rankmath. I tried to export titles & meta from “WordPress Menu > Rank Math > Status & Tools > Import & Export ” and imported succesfully to https://agendas.orem.com.mx/. However I am still experiencing the same problem.

    Please notice the website was renamed from https://unestilodevida.orem.com.mx to https://agendas.orem.com.mx/.

    Anonymous
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    Please also add the FTP logins in the sensitive data section so we can immediately revert any changes that might occur during troubleshooting since the issue is a Fatal error.

    Meanwhile, please check if you have already applied the filter here to enable Rank Math in Elementor Templates:
    https://rankmath.com/kb/enable-rank-math-on-elementor-templates/

    Looking forward to helping you.

    Thank you.

    Hello,

    Almost all the landing pages had incorrect cache keys for the OpenGraph image and that was causing the issue on your website.

    This might have happened during the import where the cache keys were set incorrectly so we deleted them all and now they will be generated correctly for each page when you open them.

    We tested this on several pages and it’s working fine on the website.

    Having said that, we left the plugin disabled at the moment since that was the state of it when we first logged in, but you can safely enable it and test the pages.

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

    Anonymous
    Rank Math free

    Thanks a lot, I will review and confirm

    Hello,

    We are glad that we could address your concerns. Do let us know how that goes.

    In the meantime, please do not hesitate to let us know if you need my assistance with anything else.

    Thank you.

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

You must be logged in to reply to this ticket.