• Resolved fagworio

    (@fagworio)


    I just update the php version to 8 and Rank math started to show this error.
    I tried to solve using this tutorial.

    https://rankmath.com/kb/fatal-error-after-1-0-49-update/

    Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /www/wwwroot/www.unicorniohater.com.br/wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-opengraph.php:46 Stack trace: #0 [internal function]: RankMath\Schema\Opengraph->RankMath\Schema\{closure}() #1 /www/wwwroot/www.unicorniohater.com.br/wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-opengraph.php(47): array_filter() #2 /www/wwwroot/www.unicorniohater.com.br/wp-includes/class-wp-hook.php(303): RankMath\Schema\Opengraph->add_schema_tags() #3 /www/wwwroot/www.unicorniohater.com.br/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #4 /www/wwwroot/www.unicorniohater.com.br/wp-includes/plugin.php(518): WP_Hook->do_action() #5 /www/wwwroot/www.unicorniohater.com.br/wp-content/plugins/seo-by-rank-math/includes/traits/class-hooker.php(88): do_action_ref_array() #6 /www/wwwroot/www.unicorniohater.com.br/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-opengraph.php(73): RankMath\OpenGraph\OpenGraph->do_action() #7 /www/wwwroot/www.unicorniohater.com.br/wp-includes/class-wp-hook.php(303): RankMath\OpenGraph\OpenGraph->output_tags() #8 /www/wwwroot/www.unicorniohater.com.br/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #9 /www/wwwroot/www.unicorniohater.com.br/wp-includes/plugin.php(518): WP_Hook->do_action() #10 /www/wwwroot/www.unicorniohater.com.br/wp-content/plugins/seo-by-rank-math/includes/traits/class-hooker.php(88): do_action_ref_array() #11 /www/wwwroot/www.unicorniohater.com.br/wp-content/plugins/seo-by-rank-math/includes/frontend/class-head.php(158): RankMath\Frontend\Head->do_action() #12 /www/wwwroot/www.unicorniohater.com.br/wp-includes/class-wp-hook.php(303): RankMath\Frontend\Head->head() #13 /www/wwwroot/www.unicorniohater.com.br/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #14 /www/wwwroot/www.unicorniohater.com.br/wp-includes/plugin.php(470): WP_Hook->do_action() #15 /www/wwwroot/www.unicorniohater.com.br/wp-includes/general-template.php(3015): do_action() #16 /www/wwwroot/www.unicorniohater.com.br/wp-content/plugins/td-standard-pack/Newspaper/header.php(11): wp_head() #17 /www/wwwroot/www.unicorniohater.com.br/wp-content/plugins/td-composer/td-composer.php(246): require_once('...') #18 /www/wwwroot/www.unicorniohater.com.br/wp-includes/class-wp-hook.php(303): {closure}() #19 /www/wwwroot/www.unicorniohater.com.br/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #20 /www/wwwroot/www.unicorniohater.com.br/wp-includes/plugin.php(470): WP_Hook->do_action() #21 /www/wwwroot/www.unicorniohater.com.br/wp-content/themes/Newspaper/header.php(2): do_action() #22 /www/wwwroot/www.unicorniohater.com.br/wp-includes/template.php(770): require_once('...') #23 /www/wwwroot/www.unicorniohater.com.br/wp-includes/template.php(716): load_template() #24 /www/wwwroot/www.unicorniohater.com.br/wp-includes/general-template.php(48): locate_template() #25 /www/wwwroot/www.unicorniohater.com.br/wp-content/plugins/td-standard-pack/Newspaper/page.php(7): get_header() #26 /www/wwwroot/www.unicorniohater.com.br/wp-includes/template-loader.php(106): include('...') #27 /www/wwwroot/www.unicorniohater.com.br/wp-blog-header.php(19): require_once('...') #28 /www/wwwroot/www.unicorniohater.com.br/index.php(17): require('...') #29 {main} thrown in /www/wwwroot/www.unicorniohater.com.br/wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-opengraph.php on line 46
    

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @fagworio,

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

    As requested earlier, here:
    https://wordpress.org/support/topic/rankmath-is-showing-illegal-string-offset-type-in-intext/

    Please delete and add the Schema again which is showing the error.

    Looking forward to helping you.

    Thread Starter fagworio

    (@fagworio)

    I manually deleted all Rank Math related tables in my database and reinstalled, getting the same error. I did this process 3 times

    After that I thought about installing Yoast, when installing Yoast I went to the import option and in this option there is an option to clear all rankmath data. I made it.

    Deactivated Yoast and installed Rank Math again and it worked. And finally I stopped the Fatal Error. So now I thought about importing the data I exported from Rank Math and presto, all the data will be imported into Rank Math, happy thoughts.

    I wanted to say that I had a happy ending, but I lost all the data except some. I believe that exporting from Rank Math only exports basic data. But the good news is that I will be able to use Rank Math, the bad news is that I have over 6,000 posts on my site.

    I wish it had had a happy ending and made it easier to correct the error, in the end the response from Support was very general.

    Like: “It seems like the Schema is broken on the page where you are getting this error. The @type which is a required field is missing on the page.”

    Solution: “Deleting the Schema on the page and adding it again should fix the issue since by default we add @type to all the Schema types.”

    The problem is I have more than 6 thousand posts, anyway I think I worked on deleting the Schema. I just need to restart from zero now and recreate all my schema.

    Could be useful if the plugin shows what posts have a wrong Schema that way we could fix it.

    • This reply was modified 5 months, 1 week ago by fagworio.
    • This reply was modified 5 months, 1 week ago by fagworio.
    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @fagworio

    We are extremely sorry for the inconvenience that might have been caused due to that.

    WordPress has strict guidelines to follow where we can mostly tell the steps to troubleshoot. For the future, you can check our detailed guidelines here:
    https://rankmath.com/kb/
    and search on our public forum:
    https://support.rankmath.com/

    With that being said, there are existing feature requests, so we’ve added your vote to our internal suggestions lists. If your suggestions are something that we’re able to introduce, we’ll be sure to let you know.

    If there’s anything else we can help you with, please let us know. We are here to assist. Thank you.

    Thread Starter fagworio

    (@fagworio)

    Thanks, my point is that maybe there is something easier to solve this problem. I was using Rank Math since the beginning of my site, I lost 3 years of schema.

    If there is a possibility of diagnosing this problem, We could avoid having to lost the post schema.

    Thank you for reviewing this issue with your team.

    • This reply was modified 5 months, 1 week ago by fagworio.
    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello,

    If you can share the export of the posts with us, maybe we can check for you and see what went wrong and where.

    Looking forward to helping you. Thank you.

    Thread Starter fagworio

    (@fagworio)

    Thanks for the reply.

    Yes, for sure, this is my exported file from Rank Math that I used to import the settings.

    Download RankMatath File exported

    • This reply was modified 4 months, 4 weeks ago by fagworio.
    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @fagworio

    The link is throwing an error:
    https://i.rankmath.com/OIAziI

    Can you please upload it somewhere else?

    Looking forward to helping you. Thank you.

    Thread Starter fagworio

    (@fagworio)

    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @fagworio

    You have shared the export of the Settings and not of the post. The settings look fine. In your posts (in postmeta table) invalid Schema data is stored which is throwing an error.

    Looking forward to helping you. Thank you.

    Thread Starter fagworio

    (@fagworio)

    Thanks for your reply, probably the schema was not exported due to the problem. Sad, I need to redo all my work. But thanks for your time to review this.

    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello,

    Sorry that we were not able to help you here.

    For the future, you can search on our website for any related issues and possible solutions, here:
    https://rankmath.com/kb/
    and
    https://support.rankmath.com/

    Hope that helps. Thank you.

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.