Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The form's view data is expected File #31

Open
h-sn opened this issue Feb 1, 2017 · 2 comments · May be fixed by #65
Open

The form's view data is expected File #31

h-sn opened this issue Feb 1, 2017 · 2 comments · May be fixed by #65
Labels
Projects

Comments

@h-sn
Copy link

h-sn commented Feb 1, 2017

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
Copy link

kolvin commented Jun 27, 2017

Any progress on this?

@kochen
Copy link

kochen commented Aug 23, 2017

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

@kochen kochen linked a pull request Oct 17, 2017 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

4 participants