Closed Spomky closed 10 years ago
Did you installed the version 1.1 ?
If you did so, you will have to upgrade to version 1.1.1
If not, change BaseFileListener::preSetData(DateEvent $event) in BaseFileListener::preSetData(FormEvent $event).
Hi,
As @systemasis said, you should use master or last tag 1.1.1 which are ok with last symfony version.
Hi,
i still have the same problem ! I'm under symfony 2.3.13, and tried with media bundle 1.1 and 1.1.1
Her is the error :
ContextErrorException: Catchable Fatal Error: Argument 1 passed to Vlabs\MediaBundle\EventListener\BaseFileListener::preSetData() must be an instance of
Symfony\Component\Form\Event\DataEvent,
instance of Symfony\Component\Form\FormEvent given in /path/to/site/vendor/vlabs/media-bundle/Vlabs/MediaBundle/EventListener/BaseFileListener.php line 59
I've tried to set public function preSetData(FormEvent $event) instead of public function preSetData(DataEvent $event)
and get this error
ContextErrorException: Catchable Fatal Error: Argument 1 passed to Vlabs\MediaBundle\EventListener\BaseFileListener::preSetData() must be an instance of
Vlabs\MediaBundle\EventListener\FormEvent,
instance of Symfony\Component\Form\FormEvent given in /path/to/site/vendor/vlabs/media-bundle/Vlabs/MediaBundle/EventListener/BaseFileListener.php line 59
Any help is welcom. Thank you
Hi,
I had same error. I fixed it by changing:
in file myproject/vendor/vlabs/media-bundle/Vlabs/MediaBundle/EventListener/BaseFileListener.php lines: 59 => public function preSetData(FormEvent $event)
for => public function preSetData(\Symfony\Component\Form\FormEvent $event) "don't forget \ before Symfony"
and 80 => public function bind(DataEvent $event)
for => public function bind(\Symfony\Component\Form\FormEvent $event)
After that everything started to work perfectly
Hi,
I have followed the documentation and I get this error:
I use Symfony 2.4 Any idea?