loadByProperties should not urldecode

Created on 9 September 2025, 1 day ago

Problem/Motivation

There is a urldecode on the $file_name which is used as a the uri property when trying to load the file. The problem is this decodes urls like 'my+file.jpeg' into 'my file.jpeg' and doesn't match the stored uri property and therefore doesn't match the file. See https://www.php.net/manual/en/function.urldecode.php where it says "Plus symbols ('+') are decoded to a space character."

Steps to reproduce

Add a media item with a file name containing a plus symbol in it. Then try to generate an image derivative for it using drimage_improved and note that the file can't be found and no image is produced. It will throw a log message "Image not found"

Proposed resolution

Remove the urldecode from line 139.

Remaining tasks

  • ✅ File an issue
  • ➖ Addition/Change/Update/Fix
  • ➖ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ➖ Code review by maintainers
  • ➖ Full testing and approval
  • ➖ Credit contributors
  • ➖ Review with the product owner
  • ➖ Release notes snippet
  • ❌ Release

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A
🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇮🇹Italy tanc Italy

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024