- Issue created by @ben.campbell
- 🇪🇨Ecuador jwilson3
@ben.campbell, does rebuilding all caches after updating, as indicated in the 2.3.4 release notes → resolve the problem?
- 🇪🇨Ecuador jwilson3
@ben.campbell, thanks for the feedback. Can you tell me a little more about your setup please.
Verify plugin file location Confirm the Svg.php file is in the correct location according to the namespace. If installed via composer with a conventional Drupal composer installation the file should be located in web/modules/custom/svg_image_field/src/Plugin/media/Source/Svg.php (the top-level folder "web" might instead be called "docroot" or something similar, or in some rare cases may not even be present).
Confirm case-sensitive filesystem: Are you running on an operating system that leverages a case sensitive filesystem like Windows or Mac?
Confirm title-case filename: Please verify that the filename is exactly
Svg.php
and notSVG.php
, noting correct capitalization of the first letter only. This file is located atmodules/contrib/svg_image_field/src/Plugin/media/Source/Svg.php
. The 'svg' MediaSource plugin not being found could be related to the file's case not getting changed properly in the version upgrade to 2.3.4.Rebuild composer's autoload files. Run a
composer dump-autoload
. Then anotherdrush cache:rebuild
, and then check again to see if the problem goes away.Check file permissions:. Ensure the Svg.php file has proper read permissions and can be read by the webserver with:
chmod 644 web/modules/custom/svg_image_field/src/Plugin/media/Source/Svg.php
Check for stale cache files: Sometimes old cached versions of the plugin definition can persist. Please check and clear:
sites/default/files/php/twig/* sites/default/files/php/*