- Issue created by @chihab
- 🇮🇳India sarwan_verma
Hi,
I have resolved the 'Error uploading SVG' issue and attached a patch.
Please review and verify it.
Thank you! - Status changed to Needs review
about 1 month ago 8:29pm 13 January 2025 - First commit to issue fork.
- Merge request !35Remove the svg_image_field_validate_mime_type and blank line. → (Open) created by kevinquillen
- 🇺🇸United States kevinquillen
Updated patch, removes newline.
Without the change(s) the module version is not usable in Drupal 11.
- 🇩🇪Germany thomaswalther Rhein-Main Area
I try manually deleting this line. And the error still exists. I did drush cr after.
I will try tomorrow again. - 🇪🇨Ecuador jwilson3
As was pointed out in 🐛 PluginNotFoundException: The "svg_image_field_validate_mime_type" plugin does not exist Active , a similar issue was reported for the Webform module 🐛 Drupal\Component\Plugin\Exception\PluginNotFoundException: The "webform_file_validate_extensions" plugin does not exist Closed: outdated .
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 ✨ Replace webform_file_validate_extensions with Constraint plugin Active ) is that we should replace the file validation logic with a new Constraint plugin, instead of simply deleting the #file_validator from the codebase.
- 🇪🇨Ecuador jwilson3
I would also point out that we had a similar issue that was intended to bring about backward compatibility to the #file_validator functionality in 🐛 Duplicate allowed types help text Active , so it may make sense to implement a similar approach here, to add in the Drupal 11 compatibility.
- First commit to issue fork.
- Merge request !37Issue #3482121: Error uploading svg from the media tab (The "file_validate_extensions" plugin does not exist) → (Merged) created by Taran2L
- 🇪🇨Ecuador jwilson3
It 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.
- 🇺🇦Ukraine Taran2L Lviv
hi @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 📌 Make CI green again Active
-
jwilson3 →
committed b2fd7d75 on 2.3.x authored by
taran2l →
Issue #3482121 by taran2l, jwilson3, kevinquillen, sarwan_verma: Error...
-
jwilson3 →
committed b2fd7d75 on 2.3.x authored by
taran2l →
- 🇪🇨Ecuador jwilson3
Thanks 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: 📌 Drupal 11.2.x compatiblity Active
-
jwilson3 →
committed 86f61312 on 2.3.x
Issue #3482121 by jwilson3: correct string parameters for...
-
jwilson3 →
committed 86f61312 on 2.3.x
- 🇪🇨Ecuador 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:
📌 Svg Image Constraint Validator is not used in Media Library modal upload form Active
Automatically closed - issue fixed for 2 weeks with no activity.