Hi @corzel ,
Thanks for your message. Please let me know on which page do you see the error (or it’s logged)? Is that the single post/page or a category?
Thread Starter
corzel
(@corzel)
Hi Anh,
I see this in the php error log file of my server in /var/www/logs/error.log
The plugin seems to work just fine.
Hi @corzel ,
Can you help me to see which page when you visit, an error is added to the error.log?
Also, if possible, please enable WP_DEBUG in the wp-config.php file. Then if any error happens, it will show on the website. You can use this way to see which page causes the bug. When you’re done, please disable WP_DEBUG. For more details about that, please see this article:
Debugging in WordPress
Thread Starter
corzel
(@corzel)
Hi Anh,
I saw them on every page. After the last update those notices disappeared, but now this appears:
Notice: Trying to get property 'display_name' of non-object in /var/www/html/wp-content/plugins/slim-seo/src/MetaTags/OpenGraph.php on line 159
I modified OpenGraph.php and changed lines 158 and 159 for this:
$author = get_the_author_meta( 'display_name', get_queried_object()->post_author );
return $author;
I don’t know if this breaks the function but at least the notice no longer appears.
Regards.
Hi @corzel ,
Thanks for your feedback. Your code seems to be “safer”. I’ve made the change to the plugin with your code and it’ll be available in the next version.