• Resolved santinopetrovic

    (@santinopetrovic)


    When I try to upload an image with Elementor Pro, I get this PHP error message:

    PHP message: PHP Fatal error: Uncaught TypeError: Argument 1 passed to Yoast\WP\SEO\Builders\Indexable_Hierarchy_Builder::is_invalid_ancestor() must be an instance of Yoast\WP\SEO\Models\Indexable, bool given, called in /var/www/site/wordpress/wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php on line 176 and defined in /var/www/site/wordpress/wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php:340

    Why does this error occur and how can i fix this?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello,

    Thanks for reaching out.

    The error could be because there is an incomplete plugin update due to a server or connection hiccup. Therefore, we recommend you, please manually re-install the plugin using the following steps:

    – Deactivate and remove the existing version of Yoast SEO from your site.
    – Re-install the latest version of Yoast SEO plugin on your site.

    Please note that by manually performing the relevant plugin re-installation, you won’t lose any SEO data that you put into the plugin before. All the data will remain the same as expected.

    I have the exact same error:
    Fatal error: Uncaught TypeError: Argument 1 passed to Yoast\\WP\\SEO\\Builders\\Indexable_Hierarchy_Builder::is_invalid_ancestor() must be an instance of Yoast\\WP\\SEO\\Models\\Indexable, bool given, called in /nas/content/live/ttmstaging/wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php on line 176 and defined in /nas/content/live/ttmstaging/wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php:340\nStack trace:\n#0 /nas/content/live/ttmstaging/wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php(176): Yoast\\WP\\SEO\\Builders\\Indexable_Hierarchy_Builder->is_invalid_ancestor(false, 53, Array)\n#1 /nas/content/live/ttmstaging/wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php(112): Yoast\\WP\\SEO\\Builders\\Indexable_Hierarchy_Builder->add_ancestors_for_post(53, 1201, Array)\n#2 /nas/content/live/ttmstaging/wp-content/plugins/wordpress-seo/src/builders/indexable-builder.php(198): Yoast\\WP\\SEO\\Builders\\Indexable_Hierarchy_Builder->build(O in /nas/content/live/ttmstaging/wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php on line 340,

    • This reply was modified 4 years, 1 month ago by texanjake.

    Hi @santinopetrovic,

    Since the error mentions the Yoast tables, it may help to allow Yoast SEO to re-scan the SEO data on your site.

    If your WordPress version is up-to-date and is using the latest version of Yoast SEO 15.8, please try the following steps:

    1. Install and activate the Yoast Test Helper plugin
    2. Go to Tools -> Yoast Test
    3. Click the “Reset indexables and migrations” button
    4. Go to SEO -> Tools and under “Optimize SEO Data” click the “Start SEO data optimization” button.

    For sites with more than 10,000 posts, we’d advise using the WP CLI command to do the indexation on the server instead of going to SEO > Tools. You can read more about this here: WP CLI – Reindex Indexables command

    Does the error still appear?

    @texanjake Thanks for letting us know you’re having a similar problem. If the above advice doesn’t work for you or if you have further questions specific to your site, we’d like you to create a new forum topic so we can troubleshoot issues for your site.

    Thread Starter santinopetrovic

    (@santinopetrovic)

    Hi again!

    I tried to do as you adviced and followed step by step, but it didn’t work and I get the same error message in my logs.

    However, when I tried to upload the image directly on pages -> edit page with Elementor, it works. But it does not work when you try to edit under templates -> saved templates on Elementor.

    Plugin Support devnihil

    (@devnihil)

    @santinopetrovic Thanks for your reply and for the additional information.

    Can you please confirm you are using the most recent version of Yoast SEO, version 15.8? You can learn more about updating here: https://yoast.com/help/how-can-i-update-my-free-plugin/

    Also, can you confirm you are using WordPress 5.6.1 You can check by clicking on the W in the top left and selecting About. If you need to update, please check with your host provider. Please know that if you are using an older version of WordPress Core you may experience unexpected behavior with Yoast. This guide explains more: https://yoast.com/why-we-dont-support-old-wordpress-versions/

    If you update to the most current version of WordPress and Yoast SEO, does this resolve the issue with the upload error in Elementor Pro?

    If after ensuring that both WordPress, Yoast SEO, and your other plugins and themes are up to date the issue is still occurring, we’d next recommend performing a conflicting check to see whether another plugin or theme is interfering with the Yoast SEO Plugin. This will help us narrow down the exact cause and determine what the next steps are while saving you time.

    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.

    If 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.

    Plugin Support devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Yoast with Elementor – cannot upload image’ is closed to new replies.