I get this error when I leave an image field empty and it is still rendered.
The source is not svg_image itself as it works fine in an empty project but it appears in conjunction with other modules(needs investigation which).
Proposed sollution:
in svg_image_preprocess_image_style() run the code only if #uri is also provided.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | empty_field_fix-3154892-2.patch | 661 bytes | rrotari |
Issue fork svg_image-3154892
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:
- 8.x-1.x
changes, plain diff MR !6
- 3154892-query-condition-s
changes, plain diff MR !5
Comments
Comment #2
rrotariProposed solution integration: skip functionality if uri is empty.
Comment #3
TylerMarshall commentedHi there,
I can confirm that this is an issue when someone does not have a required image field. Patch above works for me.
Comment #4
falco010Had the same problem and the above patch #2 fixed it for me, thanks!
Comment #5
g-brodieiSame here, query failed when the node content was generated with devel generate, which is an empty image.
Fixed with patch #2. Thanks!
Comment #6
steinmb commentedComment #7
hkirsman commentedRare one but solved the error I had.
Comment #8
lyndasantiago commentedHi, I have applied this patch and when composer install has finished running, I get an error saying
Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2020-06-25/empty_field_fix-3154892-2...
I would appreciate some help. Thank you so much.
Comment #9
steinmb commentedTry running composer with the
-vvvoption.Comment #15
imyaro commentedThank you, it was included to the last release (.15)