Upload a file called "a b+c d+e f+g.jpg" and watch core looks for a file called "a b c d e f g.jpg". Solution is to search using file_scan_directory() the correct file replacing all spaces and plus signs with (\s+|\+)

Comments

mikeytown2’s picture

Status: Active » Needs review
StatusFileSize
new1.1 KB

Patch fixes error generating image messages when the image exists and image contains plus signs in its name.

mgifford’s picture

Is this also an issue in D8? Doesn't seem to be.

mikeytown2’s picture

What's the relevant function in D8? This is an edge case, to test drop a file with pluses in the public dir and see if you can generate the image style when hitting the URL.

mikeytown2’s picture

Title: Image styles do not get created if the original file contains a plus sign » Image styles do not get created if the original file contains a plus sign or is double url encoded
StatusFileSize
new1.92 KB

Updated patch to incorporate double url encoded urls

mgifford’s picture

Great that the bots like this patch. 11 months ago I was just trying to figure out if this needed to be fixed in D8 before being backported to D7.

mikeytown2’s picture

Error out if the $image_uri or $derivative_uri is empty. Better handles some odd edge cases.

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.