Problem/Motivation
When updating from 2.3.3 to 2.3.4 on D10.4.2, I got the message:
Drupal\Component\Plugin\Exception\PluginException: Plugin (svg) instance class "Drupal\svg_image_field\Plugin\media\Source\SVG" does not exist. in Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass() (line 97 of core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php).
Proposed resolution
Donwgrade to 2.3.3
Comments
Comment #2
jwilson3I believe this is an expected issue with the cache. We renamed a php class from
SVG.phptoVectorImage.phpSvg.phpin order to pass phpstan requirements from GitLab CI on the Drupal infrastructure.@webmestre After rebuilding the Drupal cache, does the error go away?
Comment #3
jwilson3Comment #4
webmestre commentedHi @jwilson3,
I could'nt reproduce the issue after emptying the cache.
Shoud be good now.
Comment #5
jwilson3Thank you @webmestre for confirming this.
It is a good practice to both rebuild caches (and run database updates) any time you update modules.
I will update the release notes of 2.3.4 to ensure people know they should clear caches.
Comment #6
tascA little confusion here..
I can't see that class VectorImage.php, however a class being renamed from SVG.php to Svg.php?
454081d3
Comment #7
jwilson3Thanks @tasc for keeping me honest and tracking down the change. I misremembered what we named it, got confused with a totally unrelated change (dd086f0). Will update the release notes accordingly.
Comment #8
jwilson3A related issue was reported in #3516563: Drupal\Component\Plugin\Exception\PluginException: The plugin (svg) did not specify an instance class.. I **think** it would also be resolved with a cache rebuild, but needs confirmation from those experiencing the issue to confirm.
Comment #9
jwilson3Anyone affected by this issue is recommended to please help test the fix on the other issue by upgrading (if only temporarily) to the 2.3.x-dev branch in composer, clear cache, and confirm the errors are no longer present. If I dont get feedback in 2 weeks, I'm going to cut a release with the fix that casts the net to the wider community using the module. If you're on a case-insensitive file system like Windows, I request your assistance to verify there are no more issues here.
See Issue #3516563