WordPress.org

Make WordPress Core

Opened 2 months ago

Closed 6 weeks ago

Last modified 6 weeks ago

#48790 closed defect (bug) (duplicate)

Featured Image not available with transition_post_status hook with a fresh post

Reported by: Kpudlo Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.3
Component: Post Thumbnails Keywords:
Focuses: Cc:
PR Number:

Description

When using the transition_post_status with Gutenberg, it is impossible to use the get_post_thumbnail_id of the post that is being published that has not previously been saved. Shouldn't this hook be able to grab this information?

This seems to only be an issue when a featured image is added to a post and is not saved before being published. If the post is scheduled it seems to work fine, or if is saved immediately prior to publishing it seems to work fine.

transition_post_status allows you to use get_post_thumbnai_id with the Classic Editor just fine.

Change History (3)

#1 @SergeyBiryukov
2 months ago

  • Component changed from General to Post Thumbnails

#2 @talldanwp
6 weeks ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

@Kpudlo Thanks for reporting the issue. This looks very similar to the problem reported in #46566. I noticed that ticket was also closed as a duplicate of #45114, so I'll do the same here if that's ok.

#3 @Kpudlo
6 weeks ago

Thanks for the update!

Note: See TracTickets for help on using tickets.