2

got the following error after updating from sw 6.4.8.2 to 6.4.13.0 how to solve this?

In ImageCmsElementResolver.php line 26:
                                                                                                                                                                                                                                                 
  [ArgumentCountError]                                                                                                                                                                                                                           
  Too few arguments to function Shopware\Core\Content\Media\Cms\ImageCmsElementResolver::__construct(), 0 passed in /home/xxxx/yyyyy/var/cache/dev_h444cf98b71a1ac0a254d0a81916b032e/ContainerG5HDhmp/Shopware_Production_Kernel  
  DevDebugContainer.php on line 6664 and exactly 1 expected  

 
Marc Cheng
  • 111
  • 8
  • What have you tried to resolve the problem? Where are you stuck? Did you check Shopware's upgrade notes for hints about this? – Nico Haase Oct 20 '22 at 12:46

2 Answers2

3

Add parent="Shopware\Core\Content\Media\Cms\ImageCmsElementResolver" to your service-registration in services.xml.

f.e.

<service id="My\Plugin\Core\Content\Media\Cms\Type\Teaser5in1TypeDataResolver"
                 parent="Shopware\Core\Content\Media\Cms\ImageCmsElementResolver">
            <tag name="shopware.cms.data_resolver"/>
        </service>

Read more: https://github.com/shopware/platform/issues/2463

tinect
  • 491
  • 2
  • 5
  • i searched all plugins therefore and changed what i could find. it did not fix the problem. i deactivated the theme i suspected via the database. after that i could update the theme and now it works. thanks for your help. – Marc Cheng Jul 26 '22 at 10:17
0

In my case the reason was also the Theme incompatibility — deactivating it and reinstalling the update (as explained here) solved the issue.

James Risner
  • 5,451
  • 11
  • 25
  • 47