PHP Notice: Trying to get property 'slug' of non-object

Posted in: Newsmag
Post count: 5

It took me a quick minute, but I finally found that this error was being generated by the NewsMag theme itself. I’ve disabled all of my plugins (didn’t work), cleared MySQL cache (didn’t work), reset Apache & MySQL (didn’t work)… then, I changed my theme to a default WordPress theme… WORKED!

Anyone else seeing/having this error pop up in their error logs? Anyone know how to fix it?

[03-Aug-2018 20:11:48 UTC] PHP Notice: Trying to get property ‘slug’ of non-object in > /public_html/blog/wp-includes/taxonomy.php on line 3994
[03-Aug-2018 20:11:50 UTC] PHP Notice: Trying to get property ‘slug’ of non-object in > /public_html/blog/wp-includes/taxonomy.php on line 3994
[03-Aug-2018 20:11:50 UTC] PHP Notice: Trying to get property ‘slug’ of non-object in > /public_html/blog/wp-includes/taxonomy.php on line 3994
[03-Aug-2018 20:11:52 UTC] PHP Notice: Trying to get property ‘slug’ of non-object in > /public_html/blog/wp-includes/taxonomy.php on line 3994
[03-Aug-2018 20:11:53 UTC] PHP Notice: Trying to get property ‘slug’ of non-object in > /public_html/blog/wp-includes/taxonomy.php on line 3994
[03-Aug-2018 20:11:54 UTC] PHP Notice: Trying to get property ‘slug’ of non-object in > /public_html/blog/wp-includes/taxonomy.php on line 3994
[03-Aug-2018 20:11:57 UTC] PHP Notice: Trying to get property ‘slug’ of non-object in > /public_html/blog/wp-includes/taxonomy.php on line 3994
[03-Aug-2018 20:11:59 UTC] PHP Notice: Trying to get property ‘slug’ of non-object in > /public_html/blog/wp-includes/taxonomy.php on line 3994
[03-Aug-2018 20:12:00 UTC] PHP Notice: Trying to get property ‘slug’ of non-object in > /public_html/blog/wp-includes/taxonomy.php on line 3994
[03-Aug-2018 20:12:02 UTC] PHP Notice: Trying to get property ‘slug’ of non-object in > /public_html/blog/wp-includes/taxonomy.php on line 3994

Post count: 20688

Hi,

All those notices seem to refer to a WordPress file, did you make any modifications to that file maybe? Are there any actual problems or only these notices?
Do you use any custom post types and taxonomies?

These might not cause any real problems, check if Wp-debug is set to false
https://forum.tagdiv.com/newsmag-requirements-for-newsmag/

Post count: 5

yeah, i agree that it references a WordPress file… but, the only way that I can make it go away is by disabling NewsMag theme.

I’ve disabled all plugins & changed to parent theme. The only way I can make it stop is by changing to a different theme all together. After submitting to some forums, the thought was a conflict in the NewsMag theme & a WordPress file. …thus, why I posted in this forum, looking for some help 🙂

  • This reply was modified 8 years by splaquet.
Post count: 9544

Yes, but if you make modications to the theme, that may break it, hence Simion asking about any changes you made.

Post count: 5

other than changes made from within the theme customizer, no hard coded theme changes are in place. as in, i’ve downloaded the latest theme pack/version, removed the current/live version, and uploaded a brand new file set. …still seeing the same error arise.

Post count: 9544

If using child theme did you update changed files and also update plugins? Just food for thought. Also note some plugins have bugs like latest yoast seo. Also suggest installing the classic editor plugin suggest with latest wp uodate.

Post count: 5

As I mentioned before, I’ve disabled all plugins and activated the parent theme. Error still shows.

I’ve left all plugins turned on and changed over to 2017, no error.

Post count: 9544

Which version of PHP are you using?

Post count: 5

I’m currently using php7.2

Post count: 23312

Hello splaquet,

If the problem is still there and if you need more assistance in this case, please send us an email at contact@tagdiv.com with your log-in information (wp-admin) so we can take a closer look at it. Please disable all of the untested plugins before sending us an email, because this is the first step for WordPress debugging, make a full back up to your database. Also, provide there the link of this conversation so we can quickly identify you.

Thanks for the message!

Viewing 10 posts - 1 through 10 (of 10 total)
The forum ‘Newsmag’ is closed to new topics and replies.