PHP Notice: Trying to get property 'canonical' of non-object in .../wp-content/plugins/wordpress-seo/src/integrations/front-end/feed-improvements.php on line 160
Hello,
Can you solve this problem please
Note: Trying to get property 'ID' from non-object in /home/..../plugins/secondary-title/includes/functions.php at line 469
Thank you
]]>I’ve seen this exact same issue here several times, and it seems to have always been closed with no solution. I can tell you that we do not have any custom product types.
Here is the error:
Trying to get property ‘post_status’ of non-object in [path to root]/wp-content/plugins/facebook-for-woocommerce/includes/fbproductfeed.php on line 456
]]>shortcode:
[userip_location type=’country’]
function modify_loop($query) {
if(!is_admin() && $query->is_main_query()) {
if($query->is_category(array(7,8,18,23,24)) {
// stuff
}
}
}
add_action('pre_get_posts', 'modify_loop');
If I load a non-existant URL on my site like https://example.com/this-page-doesnt-exist it will show the 404 page but with the PHP notice:
Trying to get property ‘term_id’ of non-object in ~/wp-includes/class-wp-query.php
Apparently it has something to do with the check for category IDs; without the array in is_category() the error goes away.
Doing a
var_dump($query->is_category());
var_dump(is_404());
inside the function it shows true for is_category() and false for is_404(). Why is that?
I have to add that I have Yoast SEO set to remove the category base from URLs. Perhaps this has something to do with it?
]]>Trying to get property ‘ID’ of non-object
/public_html/wp-content/plugins/schema-and-structured-data-for-wp/admin_section/common-function.php
2303
Can you let me advice me any solution?
]]>getting this error while creating new post doesn’t break anything just wonder how to remove this error?
]]>So, today i installed a plugin called simple job board, and i believe it crashed with this wordpress coupon plugin, the error message is shown only to admin, and not common user.
Notice: Trying to get property ‘post_content’ of non-object in /home/acecomorg/public_html/wp-content/plugins/wp-coupons-and-deals-premium/includes/classes/wpcd-short-code-base.php on line 41
However i still have to fix it, i have access to the code, but i dont know what to do after i open the wpcd-short-code-base.php file
I hope someone/plugin support can help. Thank you.
]]>Notice: Undefined variable: post in …/wp-content/plugins/testimonial-rotator/frontend-functions.php on line 110
Notice: Trying to get property ‘id’ of non-object in …/wp-content/plugins/testimonial-rotator/frontend-functions.php on line 110
We’d be grateful for an update to fix the problem, or some guidance on what might be going wrong. Thanks!
]]>