Lakion / CmsPlugin

Simple CMS on top of SymfonyCMF for Sylius applications.
http://lakion.com
26 stars 20 forks source link

The form's view data is expected File #31

Open h-sn opened 7 years ago

h-sn commented 7 years ago

The form's view data is expected to be an instance of class Symfony\Component\HttpFoundation\File\File, but is an instance of class PHPCRProxies__CG__\Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\Image. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms an instance of class PHPCRProxies__CG__\Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\Image to an instance of Symfony\Component\HttpFoundation\File\File.

F.e.: vendor/lakion/sylius-cms-bundle/src/Form/Type/ProductBlockType.php line 31 - ->add('image', FileType::class, [ needs to be ->add('image', ImageType::class, [

kolvin commented 7 years ago

Any progress on this?

kochen commented 7 years ago

@pjedrzejewski @michalmarcinkowski I've added PR #63 for this.