-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Method browserAction does not exist #32
Comments
Same here, is this package still up to date with the last MediaSonataBundle ? |
This bundle is currently obselete with last Symfony Core, SonataBundle and CKEditor version.
In the meantime, this module is simple, so you can implement the same system in your project. This is what I did:
|
Hi, Any news about this issue ? @filozofer If you solved this issue, is it possible to make a PR ? If not, can you add more details on what you did ? |
Hi, @JonathanBaudoin No news from the mainteners. Have a good day! |
Hi, and sorry for the delay. |
Its not compatible with sonata 3.4 and symfony 4.2 This decision works for me: #config/routes/sonata_media.yaml
#...
# browse & upload routes for CKEditor
admin_sonata_media_media_browser:
path: /admin/sonata/media/media/browser
controller: CoopTilleuls\Bundle\CKEditorSonataMediaBundle\Controller\MediaAdminController::browserAction
defaults:
_sonata_admin: sonata.media.admin.media
admin_sonata_media_media_upload:
path: /admin/sonata/media/media/upload
controller: CoopTilleuls\Bundle\CKEditorSonataMediaBundle\Controller\MediaAdminController::uploadAction
defaults:
_sonata_admin: sonata.media.admin.media #config/packages/coop_tilleuls_ck_editor_sonata_media.yaml
#override template names for compatibility with symfony 4.2
coop_tilleuls_ck_editor_sonata_media:
templates:
browser: '@CoopTilleulsCKEditorSonataMedia/MediaAdmin/browser.html.twig'
upload: '@CoopTilleulsCKEditorSonataMedia/MediaAdmin/upload.html.twig'
layout: 'sonata/coop_tilleuls_sonata_media/layout.html.twig' {# templates/sonata/coop_tilleuls_sonata_media/layout.html.twig #}
{# adding Sonata config, for compatibility with sonata 3.4 #}
{% extends '@CoopTilleulsCKEditorSonataMedia/layout.html.twig' %}
{% block meta_tags %}
<meta charset="UTF-8">
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<meta data-sonata-admin='{{ {
config: {
CONFIRM_EXIT: sonata_admin.adminPool.getOption('confirm_exit'),
USE_SELECT2: sonata_admin.adminPool.getOption('use_select2'),
USE_ICHECK: sonata_admin.adminPool.getOption('use_icheck'),
USE_STICKYFORMS: sonata_admin.adminPool.getOption('use_stickyforms'),
DEBUG: sonata_admin.adminPool.getOption('js_debug'),
},
translations: {
CONFIRM_EXIT: 'confirm_exit'|trans({}, 'SonataAdminBundle'),
},
}|json_encode()|raw }}'
>
{% endblock %} |
Thanks so much @memboc , I noted that creating the custom layout didn't make any difference + one should install an older version of ckeditor for this bundle to work: |
Hi,
On open window to insert image in CKEditor
Url
Pakage
PHP version
Sonata packages
Symfony packages
The text was updated successfully, but these errors were encountered: