Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#23628 closed defect (bug) (duplicate)

get_post_thumbnail_id() ERROR Fatal Upload image/media fail

Reported by: justintwinpeaks@… Owned by:
Priority: normal Milestone:
Component: Media Version: 2.9
Severity: normal Keywords:
Cc: Focuses:

Description

Hi I"ve been looking how to fix this. Fairly new to wordpress platform. I'm not sure how to get into the code to fix this either.

Fatal error: Call to undefined function get_post_thumbnail_id() in /home/xyzxyz/public_html/wp-admin/includes/media.php on line 1173

Change History (1)

#1 @SergeyBiryukov
14 years ago

  • Keywords needs-patch removed
  • Milestone Awaiting Review
  • Resolution → duplicate
  • Severity major → normal
  • Status new → closed
  • Version 3.5.1 → 2.9

Related: [12134]

The error message indicates that you have version 3.3.x installed, not 3.5.1:
​http://core.trac.wordpress.org/browser/tags/3.3.2/wp-admin/includes/media.php#L1173

In subsequent releases, line numbers where get_post_thumbnail_id() is called are different:
​http://core.trac.wordpress.org/browser/tags/3.4.2/wp-admin/includes/media.php#L1181
​http://core.trac.wordpress.org/browser/tags/3.5.1/wp-admin/includes/media.php#L1202

This is a duplicate of #12745 and #19814. The issue is a combination of an old release and a theme which calls add_theme_support( 'post-thumbnails' ) too late.

This was fixed in #20556.

Note: See TracTickets for help on using tickets.