PHPCRSlideshowBlockAdmin - error 500 when uploading multiple images
levuro opened this issue · 3 comments
levuro commented
The user wants to create a slideshow with several pictures. Selects an image via "Choose file" and now tries to add another element to the list by "Add new". User now gets an error 500.
Oops! An Error Occurred
The server returned a "500 Internal Server Error".
An exception has been thrown during the rendering of a template ("Parameter "path" for route "liip_imagine_filter" must match ".+" ("" given) to generate a corresponding URL.") in "CmfMediaBundle:Form:fields.html.twig" at line 9.
If you add images one by one and press save in between this works - but its not very practical
dbu commented
afaik the problem is that sonata admin needs to submit and reload the
whole list of slides when you add a new one. but you don't save yet, so
they send data and re-send the form with the values as default - which
does not work well for images. it would be nicer if the add button could
somehow just add one new empty document instead of the roundtrip
solution. there might be a better solution under way with sonata 3, but
i am not in the loop.
googling around found me this documentation:
https://sonata-project.org/bundles/admin/master/doc/cookbook/recipe_file_uploads.html#advanced-example-works-with-embedded-admins
maybe this could be used here. maybe that could even be a bugfix for the
cmf block bundle. do you want to give it a try?
levuro commented
Thanks David, i will have a look
dbu commented
media bundle is not maintained anymore. and the admins moved to their own bundle.