Problem/Motivation
When the image fails to process or load, a type error appears:
TypeError: Symfony\Component\HttpFoundation\Response::__construct(): Argument #1 ($content) must be of type ?string, Drupal\Core\StringTranslation\TranslatableMarkup given, called in /app/docroot/modules/contrib/drimage_improved/src/DrimageManager.php on line 429 in Symfony\Component\HttpFoundation\Response->__construct() (line 224 of /app/vendor/symfony/http-foundation/Response.php).
Proposed resolution
Ensure the error message is a string by casting it to a string type.
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 drimage_improved-1.0.6, drimage_improved-1.0.7
API changes
- N/A
Data model changes
- N/A
Release notes snippet
- Issue #3469425 by qusai taha: Fixed the type error by removing translation for system error messages
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3469425-2.patch | 1.58 KB | qusai taha |
Issue fork drimage_improved-3469425
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
qusai taha commentedComment #3
qusai taha commentedComment #4
qusai taha commentedComment #6
rajab natshahComment #8
rajab natshahComment #9
rajab natshahComment #10
rajab natshah✅ Released drimage_improved-1.0.6
Comment #11
rajab natshahComment #13
rajab natshahComment #14
rajab natshah✅ Released drimage_improved-1.0.7