Make WordPress Core

Opened 2 years ago

Closed 22 months ago

#55334 closed defect (bug) (invalid)

Attempt to read property "term_id" on null in "mywordpress/wp-includes/deprecated.php" on line 87

Reported by: bcue015's profile bcue015 Owned by:
Milestone: Priority: normal
Severity: minor Version: 5.9.1
Component: Taxonomy Keywords:
Focuses: Cc:


Title says it all. Error occurs whenever I uploaded "guppy.jpg" image. And I have a Guppy Categories with guppy slug. I also have a category-guppy.php in my template file. And heres the line 87 pointing out

And the result whenever I went to my guppy category link is this

It'll try to pull in my single.php cause thats what my single.php looks like.
And I had no idea why the error was in my metabox so I'll just have to show you the code anyway. Here it is

I think categories had something to do with this. And by the way Im using the latest wordpress 5.9.1 version with the following updated and activated plugins:
Advanced Custom Fields
All-in-One WP Migration
Crop Thumbnails
Regenerate Thumbnails
Manual Image Crop
WP Migrate DB

I already resolve this by changing the name of my image as long as it is not guppy. You can close this ticket cause I just want to let you guys know.

Change History (1)

#1 @desrosj
22 months ago

  • Component changed from General to Taxonomy
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Hi @bcue015,

Welcome to Trac! Sorry that this took so long to receive a response.

Unfortunately, this is not the best location to receive help with general support issues such as this. The Support Forums is more appropriate.

Having said that, there is not enough information provided to figure out what was going on. But, I did notice that the snippet had the_category_ID() which was deprecated a long time ago. I recommend using get_the_category() instead.

Note: See TracTickets for help on using tickets.