WordPress.org

Make WordPress Core

Opened 12 days ago

Last modified 3 days ago

#44563 new defect (bug)

WordPress 4.9.7 Media delete changes break plugins deleting media via stream wrappers

Reported by: antonypuckey Owned by:
Milestone: 4.9.8 Priority: normal
Severity: normal Version: 4.9.7
Component: Media Keywords: has-patch needs-testing
Focuses: Cc:

Description

This commit: https://github.com/WordPress/WordPress/commit/c9dce0606b0d7e6f494d4abe7b193ac046a322cd breaks plugins that save media to external systems via stream wrappers.

The underlying cause of this is realpath() does not accept a stream url as valid path and always returns false.

Im not that familiar with wordpress yet but I have created a patch that fixes the problem which i have attached.

Attachments (1)

wordpress-4.9.7-delete-media-streamwrapper.patch (1.5 KB) - added by antonypuckey 12 days ago.
Patch to allow stream wrapper urls to be deleted.

Download all attachments as: .zip

Change History (6)

@antonypuckey
12 days ago

Patch to allow stream wrapper urls to be deleted.

#1 @antonypuckey
12 days ago

The side effect of not using this patch is the files that are deleted from wordpress are orhpaned in the remote location and will never be deleted.

#2 @antonypuckey
12 days ago

  • Summary changed from WordPress 4.9.7 Media delete changes break plugins saving media via stream wrappers to WordPress 4.9.7 Media delete changes break plugins deleting media via stream wrappers

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


10 days ago

#4 @johnbillion
6 days ago

  • Keywords needs-testing added
  • Milestone changed from Awaiting Review to 4.9.8

Thank you very much for this report, @antonypuckey!

Moving this into the 4.9.8 milestone for investigation.

This ticket was mentioned in Slack in #core-media by joemcgill. View the logs.


3 days ago

Note: See TracTickets for help on using tickets.