• Resolved Martin Taylor

    (@docdunning)


    In our Staging environment, the error log is accumulating many PHP notices from wordpress-seo/src/context/meta-tags-context.php, which say:

    PHP Notice: Trying to get property 'permalink' of non-object in /home/[...]/wp-content/plugins/wordpress-seo/src/context/meta-tags-context.php on line 308

    This is in function generate_site_url(), and is caused by the variable $home_page_indexable being set to boolean false rather than an object.

    The code has been through several layers, including indexable_repository->find_for_home_page() and upgrade_indexable(). This last function has called builder->build(), which has returned false, and that is what has generated the error log entry back in meta-tags-context.php.

    Looking into this, I think it’s because this is a non-production environment, where reindexing is disabled.

    Please change the generate_site_url() function, so that it handles the situation where $home_page_indexable is false.

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