When I use the code in the FAQ’s and place in my header section.
<?php echo really_simple_share_publish(get_bloginfo('url'), get_bloginfo('name'));?>
I get this error when wp debug is turned on.
Notice: Trying to get property of non-object in /home3/ans/public_html/wp-includes/post-template.php on line 29
Any idea how to resolve this issue?
the issue should disappear upgrading to the 2.9.1 plugin release, out today.
Hi thank you for the update. I am still seeing the issue on my site with the 2.91, but it is not happening on all pages. If I don’t use the manual code in my theme I get no notices. But when I add the manual code, I get it on the my custom page for a taxonomy. I have two loops on the page, and when the first loop is returning no result, I am noticing the error. However if the first loop returns results I get no issues.
Any update on this? Here is some behavior I have noticed:
Except for one custom taxonomy page, the plugin is working on all of my site with no notices. But on that one page I get this notice and the facbook button does not show.
Notice: Trying to get property of non-object in /home3/fefer/public_html/wp-includes/post-template.php on line 29
I have reviewed line 29 and here is what I think is happening.
My taxonomy page has two main custom queries built into it and two wordpress loops. These queries modify the main wordpress query for the page.
It seems if the first query does not return results then it causes the error above if the plugin is active.
However, if the first query returns results then there is no error and the plugin works fine even if the second query returns results.
And if the plugin is not active I get no error whether the first query returns results or not.
I also tried turning off the facebook setting in the admin of the plugin. But the notice still happens.
Any help you can provide is much appreciated! Thank you!
Here is an update, I think I have narrowed down why the error happens. Basically if there are no posts set to published the error happens. But when you add just 1 published post the error does not happen and everything works fine. This is an issue for me because my custom taxonomy page publishes draft posts and published posts. So if a particular geography only has a draft and not a published post, I get an error.
Can you fix this in the plugin?
- The topic ‘Manually Placing In Theme Causing Error’ is closed to new replies.