[wp-trac] [WordPress Trac] #48472: The "wp_generate_attachment_metadata" filter is not fired when the initial upload request fails but the upload was completed successfully by retrying to create image sub-sizes

WordPress Trac noreply at wordpress.org
Tue Nov 5 18:42:54 UTC 2019


#48472: The "wp_generate_attachment_metadata" filter is not fired when the initial
upload request fails but the upload was completed successfully by retrying
to create image sub-sizes
-------------------------------------------------+-------------------------
 Reporter:  azaozz                               |       Owner:  azaozz
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  5.3
Component:  Upload                               |     Version:  trunk
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch needs-testing 2nd-opinion  |     Focuses:
  fixed-major                                    |
-------------------------------------------------+-------------------------
Changes (by azaozz):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"46655" 46655]:
 {{{
 #!CommitTicketReference repository="" revision="46655"
 Upload:
 - Run the `wp_generate_attachment_metadata` filter at the end in
 `wp_update_image_subsizes()` when new metadata was generated and
 additional image sub-sizes were created.
 - Add another arg in the `wp_generate_attachment_metadata` filter for
 additional context.
 - Fix inline docs and ensure the new image meta is always saved before
 starting image post-processing.

 Props SergeyBiryukov, azaozz.
 Merges [46621], [46622], and [46651] to the 5.3 branch.
 Fixes #48472.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48472#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list