When using the Managed: Download the images and save its metadata to the database, file handling option.
Sometime i get the following error:
The website encountered an unexpected error. Please try again later.
Recoverable fatal error: Object of class Drupal\Core\Field\FieldItemList could not be converted to string in Drupal\image\Entity\ImageStyle->buildUri() (line 186 of core/modules/image/src/Entity/ImageStyle.php).
Anyone has the same problem ?
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | imagecache_external-fatal_error_managed_files-2902834-3.patch | 1.05 KB | idebr |
Comments
Comment #2
j.b commentedTo solve the problem:
Change line 186 in file imagecache_external.module
From
return $file->uri to return $file->getFileUri();
Apparently $file->uri return an object/array
Comment #3
idebr commentedI can confirm the error. The suggested resolution in #2 works as expected.
Attached patch implements the proposed resolution in #2.
Comment #4
swentel commentedthis was fixed somewhere later, so this is fine.