0

i keep seeing the following in the php error log, repeating:

[05-Aug-2024 02:34:41 UTC] PHP Warning:  Attempt to read property "post_content" on null in /home/euognau/public_html/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php on line 506
[05-Aug-2024 02:34:41 UTC] PHP Warning:  Attempt to read property "ID" on null in /home/euognau/public_html/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php on line 506
[05-Aug-2024 02:34:41 UTC] PHP Warning:  Attempt to read property "post_content" on null in /home/euognau/public_html/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php on line 506
[05-Aug-2024 02:34:41 UTC] PHP Warning:  Attempt to read property "ID" on null in /home/euognau/public_html/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php on line 506

i reached out to the Rank Math support team, and they responded with the following:

If the query get_queried_object() is returning null it means that is not a WordPress object and as such the metadata cannot be generated for that particular page or set of pages.

If it’s not returning one on your website is because there is some page that is incorrectly created and not an actual object.

how would i go about addressing the portion they suggest is the cause, being an incorrectly created page object?

4
  • Impossible to answer without more information - you'll have to get the code that creates the page you're viewing that's triggering this error and parse through that to see why Rank Math isn't finding what it expects? Is this a custom theme or a third party theme? Is everything up to date? Commented Aug 6 at 15:33
  • using bricks builder. everything is up to date. i have not been able to pinpoint which page triggers this. is there an efficient way to do this, or rather, what is the way of figuring that out? thanks Commented Aug 7 at 23:36
  • Enabling visual debugging so you can see the error on screen while on a page can give you a much better idea as to where this is happening and where to start looking. Sometimes checking an error log doesn't give you the full context - I'd assume this is a backend error as it's Rank Math SEO but since it's referencing OpenGraph it could be when attempting to build <head> content. Commented Aug 8 at 13:44
  • thanks for the suggestion. i also enabled output of errors to the browser console so can spot when they may appear. will report back. Commented Aug 8 at 16:46

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.