Kunstmaan / KunstmaanBundlesCMS

An advanced yet user-friendly content management system, based on the full stack Symfony framework combined with a whole host of community bundles. It provides a full featured, multi-language CMS system with an innovative page and form assembling process, versioning, workflow, translation and media managers and much more.
https://kunstmaancms.be
MIT License
403 stars 187 forks source link

[Media] Type parameter is overwritten when adding new file #2685

Open dannyvw opened 4 years ago

dannyvw commented 4 years ago

When adding a new file in the media popup you will be redirected to the media with all available files. But this is wrong when you come from an popup where only images are allowed.

So you have a variable type with value file (click on add media > add file) and a variable type with value image. But this last one is not added in the request and also not added to the redirect.

Method: https://github.com/Kunstmaan/KunstmaanBundlesCMS/blob/master/src/Kunstmaan/MediaBundle/Controller/MediaController.php#L427

acrobat commented 4 years ago

@dannyvw where do you trigger this behaviour? Is it in the Media module? or in the media chooser in a pagepart?

dannyvw commented 4 years ago

@acrobat In the media popup modal. I have it temporarily fixed on our fork. Maybe you can use this https://github.com/insiders/KunstmaanBundlesCMS/commit/50140e5de2c74dfc1514b7f3d3d9976860d3ad01