• Resolved sergo2003

    (@sergo2003)


    Good afternoon, please tell me how to fix this warning, which is displayed on the site. If I disable the Yoast SEO plugin, then this error also disappears.

    Warning: array_key_exists() expects parameter 2 to be array, string given in /home/users/***/wp-content/plugins/wordpress-seo/src/generators/schema/breadcrumb.php on line 147

    Thanks!

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

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support Suwash

    (@suascat_wp)

    @sergo2003

    We’re sorry that you’re getting an error caused by our plugin.

    Just to be sure, we would like to rule out any plugin or theme conflicts that may occur. The fastest way to do this is to?deactivate all non-Yoast plugins and switch to a standard theme?like?Twenty Nineteen.?

    Test this on your development or staging site, if you have one. If not, we recommend using the?Health Check & Troubleshooting?plugin. This plugin allows you to run a conflict check?without affecting normal visitors to your site.

    As we can imagine that you’re unfamiliar with checking for conflicts, we’d like to point you to a step-by-step guide that will walk you through the process:?How to check for plugin conflicts.

    Thread Starter sergo2003

    (@sergo2003)

    I have already disabled all plugins, the error is still displayed. It appeared after updating the plugin.
    is discussing the same issue here, can this help?
    https://github.com/Yoast/wordpress-seo/issues/15800

    Plugin Support Suwash

    (@suascat_wp)

    We just pushed a new update Yoast SEO v15.8. Would you please update and see if this resolves the issue?

    If this doesn’t work or you have more questions, just let us know and we’ll take a further look.

    Thread Starter sergo2003

    (@sergo2003)

    The error remains, but now it gives this error
    Warning: array_key_exists() expects parameter 2 to be array, string given in /home/users***/plugins/wordpress-seo/src/generators/schema/breadcrumb.php on line 143

    The error remained, but now it throws this error. Refers to the same line in the code
    return ! \array_key_exists( ‘url’, $breadcrumb ) || ! \array_key_exists( ‘text’, $breadcrumb );

    Plugin Support Rumejan Barbarona

    (@onlyincebu)

    Hello!

    Thanks for getting back to us.

    We’ve seen a similar issue in the past, and a conflict with another plugin caused it. Just to verify, does the issue occur if you only have Yoast SEO activated with ALL other plugins deactivated and your theme switched to a standard theme like Twenty-Twenty? If no issue occurs, reactivate your other plugins one at a time and see if the issue occurs again for every plugin reactivated. Lastly, switch to your theme.

    Test this on your development site or use the Health Check & Troubleshooting plugin.

    Thread Starter sergo2003

    (@sergo2003)

    Once again I turned off the rest of the plugins, but unfortunately this did not help …

    Plugin Support devnihil

    (@devnihil)

    @sergo2003 Thanks for your reply. Did you also try resetting the site to a default theme such as TwentyTwenty, in addition to disabling other plugins?

    Also, if you clear your site’s cache (server, plugin/theme, or CDN such as Cloudflare) does this resolve the error? If you are not sure how to clear your server cache you should speak with your host provider.

    Thread Starter sergo2003

    (@sergo2003)

    Thanks for the help. The site has a native theme twenty fifteen. I don’t use CloudFlare. Cash dropped, although it is unlikely that he can affect this warning. Please look at the error itself, I think you need to “dig” in the other direction …
    I had to turn off the Yoast SEO plugin to fix the error.

    Plugin Support Suwash

    (@suascat_wp)

    @sergo2003 We tested the Twentyfifteen standard theme and Yoast SEO v15.8 on local test environment but unable to replicate the error. We need some additional information about your setup. Can you confirm that your server meets the minimum plugin requirements? You can often find these details by going to Tools > Site Health > Info in WordPress.

    We look forward to your response.

    @sergo2003 thanks for the headsup. I have written a fix for the warning. However, something is breaking schema breadcrumbs in your site. The fix will only remove the warning, but schema breadcrumbs will still fail to be generated. So it would be good to know which plugin or custom code is messing this up.

    There is a chance that you can fix this by running the “Reset migrations and indexables” button from our Yoast Test helper plugin.

    Thread Starter sergo2003

    (@sergo2003)

    I checked the requirements, everything turned out to be normal. I tried to install the PHP version from 7.1 to 7.4. Nothing changed. I tried to open it in browsers: Chrome, Mozilla, IE, Yandex. The error is present in all.
    If you enable the Yoast SEO plugin and open the Site Health section, then the warning is very confusing:

    The REST API is one way WordPress, and other applications, communicate with the server. One example is the block editor screen, which relies on this to display, and save, your posts and pages.
    The REST API did not process the context query parameter correctly.

    I think this is the problem. And if I turn off the Yoast SEO plugin, then this warning also disappears.

    Dear @djennez, where can I download your fix?

    My fix was implemented in the 15.9 release candidate of the plugin. So it should be live in the next release.

    Thread Starter sergo2003

    (@sergo2003)

    Thanks @djennez, then I’ll wait for the update

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Warning: array_key_exists() expects parameter 2 to be array’ is closed to new replies.