Quantcast
Channel: WordPress.org Forums » [Yoast SEO - Advanced SEO with real-time guidance and built-in AI] Support
Viewing all articles
Browse latest Browse all 42137

aaemnnosttv on "[Plugin: WordPress SEO by Yoast] PHP Notice "Trying to get property of non-object" on blog page"

$
0
0

Plugin version 1.4.7 (latest & same in dev version)

I just installed the plugin today on a new site that is in development.
The site currently has no posts, (which may be the cause of this notice) but when browsing to the blog page, it gives the PHP notice

Trying to get property of non-object in /.../.../.../.../.../.../wp-content/plugins/wordpress-seo/frontend/class-frontend.php on line 847

I took a look myself and it seems to be tripping up on the $post->post_type. Perhaps this should be hardcoded as "page" as I don't believe another post types are possible to be the "page_for_posts"? **I tried this and it cleared up the notice for me.

The notice is showing up twice, the first appears after the opening body tag, and the next is in the <head> after styles and before open graph data.

Cheers!

http://wordpress.org/extend/plugins/wordpress-seo/


Viewing all articles
Browse latest Browse all 42137

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>