Ramiro Anacona Meneses
Ramiro Anacona Meneses
Hi @duvg the problem isn't this bundle, the problem is the select2 library used by Sonata. My solution was make a call to setup_select2() function after the ajax call. ```...
@jesse-s not yet
Hi, I have the same problem. The final event is never triggered. [Here](https://github.com/schmittjoh/JMSJobQueueBundle/blob/master/Entity/Repository/JobRepository.php#L293), the first condition return false, $this->dispatcher is null, unless when finish Job, thus the event is not...
I have solved as follows: In app/AppKernel.php ``` php new JMS\DiExtraBundle\JMSDiExtraBundle($this), new JMS\AopBundle\JMSAopBundle(), ```
## Proposed solution If I'm updating a media from an admin form that's what I want to do: update it, right? So, I think the best option is pass `'new_on_update'...
@greg0ire yes it's possible but only if you use the form sonata_media_type, but is not possible to set it from admin form.
It's always true because none option is passed from here [https://github.com/sonata-project/SonataMediaBundle/blob/3.x/Admin/BaseMediaAdmin.php#L197](https://github.com/sonata-project/SonataMediaBundle/blob/3.x/Admin/BaseMediaAdmin.php#L197)
This is the stack trace: ```bash Exception: at vendor/sonata-project/media-bundle/Form/DataTransformer/ProviderDataTransformer.php:151 at Sonata\MediaBundle\Form\DataTransformer\ProviderDataTransformer->getOptions(array()) (vendor/sonata-project/media-bundle/Form/DataTransformer/ProviderDataTransformer.php:48) at Sonata\MediaBundle\Form\DataTransformer\ProviderDataTransformer->__construct(object(Pool), 'Application\\Sonata\\MediaBundle\\Entity\\Media') (vendor/sonata-project/media-bundle/Admin/BaseMediaAdmin.php:197) at Sonata\MediaBundle\Admin\BaseMediaAdmin->configureFormFields(object(FormMapper)) (app/cache/dev/classes.php:3228) at Sonata\AdminBundle\Admin\AbstractAdmin->defineFormBuilder(object(FormBuilder)) (app/cache/dev/classes.php:3222) at Sonata\AdminBundle\Admin\AbstractAdmin->getFormBuilder() (app/cache/dev/classes.php:4227) at Sonata\AdminBundle\Admin\AbstractAdmin->buildForm() (app/cache/dev/classes.php:3261) at Sonata\AdminBundle\Admin\AbstractAdmin->getForm()...
The option in the `__construct` method for ProviderDataTransformer is by default empty: [https://github.com/sonata-project/SonataMediaBundle/blob/3.x/Form/DataTransformer/ProviderDataTransformer.php#L45](https://github.com/sonata-project/SonataMediaBundle/blob/3.x/Form/DataTransformer/ProviderDataTransformer.php#L45) From here: the transformers is being calling without options: [https://github.com/sonata-project/SonataMediaBundle/blob/3.x/Admin/BaseMediaAdmin.php#L197](https://github.com/sonata-project/SonataMediaBundle/blob/3.x/Admin/BaseMediaAdmin.php#L197) I know you said that options are...
Maybe you're right, but my question is, if you have access to the admin form (sonata admin interface) and you choose to update a media why a new media is...