Closed (fixed)
Project:
SVG Image Field
Version:
2.3.x-dev
Component:
User interface
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
21 Oct 2024 at 09:57 UTC
Updated:
20 Feb 2025 at 16:49 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
sarwan_verma commentedHi,
I have resolved the 'Error uploading SVG' issue and attached a patch.
Please review and verify it.
Thank you!
Comment #5
kevinquillen commentedUpdated patch, removes newline.
Without the change(s) the module version is not usable in Drupal 11.
Comment #6
thomaswalther commentedI try manually deleting this line. And the error still exists. I did drush cr after.
Maybe it do not work after an installation.
I will try tomorrow again with the fix before enabling.
Comment #7
kevinquillen commentedDid you try the dev branch?
Comment #8
jwilson3As was pointed out in #3489364: PluginNotFoundException: The "svg_image_field_validate_mime_type" plugin does not exist, a similar issue was reported for the Webform module #3409599: Drupal\Component\Plugin\Exception\PluginNotFoundException: The "webform_file_validate_extensions" plugin does not exist.
This problem (I believe) is related to core Change Record #3363700: file_validate and related functions are deprecated and replaced with file.validator service and Constraint plugins.
My quick assessment here (similar to DamienMcKenna's follow-up issue on the webform queue) is that we should replace the file validation logic with a new Constraint plugin, instead of simply deleting the #file_validator from the codebase.
Comment #9
jwilson3I would also point out that we had a similar issue that was intended to bring about backward compatibility to the #file_validator functionality in #3440077: Support new upload validator syntax from D10.2+, so it may make sense to implement a similar approach here, to add in the Drupal 11 compatibility.
Comment #12
jwilson3It looks like the remaining failures are unrelated to the immediate fix here, but do have to do with Drupal 11 compatibility, code-sniffs, and deprecations.
@Taran2L If you're interested to keep pushing through, it would be fine to pull off the other "gitlab ci build failures for D11" to a separate issue for separate credits. Up to you.
Comment #13
taran2lhi @jwilson3
this pipeline shows that it works now with D11 -> https://git.drupalcode.org/issue/svg_image_field-3482121/-/pipelines/403938
I'm removing gitlab CI staff from this one, as there is another one for that already #3501734: Drupal 11 compatibility fixes
Comment #15
taran2lComment #16
taran2lComment #17
jwilson3I've just merged #3501734: Drupal 11 compatibility fixes. Will rebase...
Comment #18
jwilson3Comment #20
jwilson3Thanks folks for helping with the fix here.
With this issue fixed, I believe the module should now be fully compatible with Drupal 11.
While working on this issue, I noticed some deprecation warnings related to views integration for bleeding 11.2.x branch (release date scheduled for June 2025).
I've created a follow-up: #3501879: Drupal 11.2.x compatibility
Comment #22
taran2lthanks for the fast turnaround!
Comment #23
jwilson3👍
This critical Drupal 11 compatibility issue has been included in the latest SVG Image Field module release 2.3.4
Note we still have a follow-up issue pending to get the new constraint validator (the fix introduced here) working on the modal forms:
#3501882: Use Constraint Validator on SVG upload in Media Library modal form