coopTilleuls / CoopTilleulsCKEditorSonataMediaBundle

Integrates SonataMediaBundle for Symfony with CKEditor
http://les-tilleuls.coop
MIT License
53 stars 41 forks source link

Symfony 3.* support #25

Closed skoubin closed 7 years ago

skoubin commented 7 years ago

Does the bundle support Symfony 3.*?

I just tried it with SF 3.2 and I get the following error at the Controller/MediaAdminController.php at, browerAction line 67 The "form" extension is not enabled.

I quickly modified the line

$this->get('twig')->getExtension('form')->renderer->setTheme($formView, $this->admin->getFilterTheme());

to

$this->get('twig')->getExtension('Symfony\Bridge\Twig\Extension\FormExtension')->renderer->setTheme($formView, $this->admin->getFilterTheme());

but then I got another error at Resources/views/layout.html.twig at line 12 saying:

Block "form" on template "CoopTilleulsCKEditorSonataMediaBundle::layout.html.twig" does not exist.

I commented out the blocks (form, show, side_menu, content, title, breadcrumb) that were throwing the error, commented out some of the HTML and it kind of worked. I am able to select an image that is successfully added to the CKEditor.

Any idea why those blocks are not available from the Twig?

UPDATE Modifying the Resources/views/layout.html.twig, I managed to make it work. So it seems that this issue is also related with a version of Sonata Admin bundle that is not compatible with the CoopTilleulsCKEditorSonataMediaBundle.

For reference, I use:

Webonaute commented 7 years ago

I did a pull request for symfony3 support. https://github.com/coopTilleuls/CoopTilleulsCKEditorSonataMediaBundle/pull/26

meyerbaptiste commented 7 years ago

Fixed in #26

rusk911 commented 6 years ago

please tag this update...

sroze commented 6 years ago

I'd phrase it this way: "Thank you for fixing the issue. Could you please tag a release, dear maintainers?"

meyerbaptiste commented 6 years ago

Done @rusk911.

rusk911 commented 6 years ago

Thank you!

Van-peterson commented 6 years ago

@skoubin , I have the same error, How have you solve the problem ?

rusk911 commented 6 years ago

@Van-peterson just use latest version in composer.

Van-peterson commented 6 years ago

@rusk911 I already update my composer but still the same My problem is not from CoopTilleulsCKEditorSonataMediaBundle I'm using Symfony 4.1 & When I try to override the CRUDController of Sonata Admin i got the error ("form" extension is not enabled.)