i will upload multipe Images in an Sonta Admin Frontend with and Sonata_Form_Collection.
The upload is the following error in the log:
[2017-06-24 13:06:19] request.CRITICAL: Uncaught PHP Exception Symfony\Component\PropertyAccess\Exception\InvalidArgumentException: "Expected argument of type "AppBundle\Entity\Picture", "array" given" at /Users/Christian/Sites/zeltplatz/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php line 275 {"exception":"[object] (Symfony\\Component\\PropertyAccess\\Exception\\InvalidArgumentException(code: 0): Expected argument of type \"AppBundle\\Entity\\Picture\", \"array\" given at /Users/Christian/Sites/zeltplatz/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php:275)"} []
Here my Campground Entity:
and my Picture Entity:
Also my Sonata Campground Admin:
and Sonata Picture Admin:
The goal is that I can save several pictures for a campground.
Thanks for feedback and ideas
Here you have a problem with the data type, you need instance of Picture and you give array(of pictures i think). Maybe try add pictures one after the other in loop.