I was using file type in collection and everything works (I can add, edit, delete).
If I replace formType from file to single_upload I can edit and delete, but I can not add a new file. I've got :
Catchable Fatal Error: Argument 1 passed to ...\SiteBundle\Entity\Data::addFile() must be an instance of ...\SiteBundle\Entity\File, null given in /.../.../SiteBundle/Entity/Data.php line ...
I don't know if this is an excepted behavior.
I've looked into the POST request when I try to add a file and the input file form name change. For file type:
edit_data[files][2][file]
and for single_upload type:
edit_data[files][2][file][file]
Here is an extract from Data-generator.yml and File-generator.yml:
I was using file type in collection and everything works (I can add, edit, delete). If I replace formType from file to single_upload I can edit and delete, but I can not add a new file. I've got :
I don't know if this is an excepted behavior.
I've looked into the POST request when I try to add a file and the input file form name change. For file type:
and for single_upload type:
Here is an extract from Data-generator.yml and File-generator.yml:
and
If I change single_upload by file in my File-generator.yml everything works fine...