genemu / GenemuFormBundle

Extra Form : Captcha GD, Tinymce, Recaptcha, JQueryDate, JQueryAutocomplete, JQuerySlider, JQueryFile, JQueryImage
587 stars 265 forks source link

Not using ReCaptcha but still get error #424

Open benjaminu opened 8 years ago

benjaminu commented 8 years ago

Hi,

Trying to upgrade a legacy app to Symfony v3.0.6. Installed v3.0@dev of GenemuFormBundle but I get an error when I run bin/console cache:clear --no-warmup.

Here it is:

[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
  The service "genemu.form.type_recaptcha.validator" has a dependency on a non-existent service "request".

Here are the settings I have tried to use in my config.yml: 1.

genemu_form:
    tinymce:
        enabled: true
        theme: advanced
        configs:
            theme_advanced_buttons1: "bold,italic,sub,sup,|,bullist,numlist,|,undo,redo,|,pastetext,pasteword,|,formatselect,|,link,unlink,|,cleanup"
            theme_advanced_buttons2: ""
            theme_advanced_buttons3: ""
            theme_advanced_buttons4: ""
            theme_advanced_toolbar_location: "top"
            theme_advanced_toolbar_align: "left"
            theme_advanced_statusbar_location: "bottom"
            theme_advanced_resizing: true
            theme_advanced_blockformats: "p,h2,h3,h4"
            skin : "thebigreason"
            width : "700"
            height: "250"
            valid_elements : "a[href|target=_blank],strong,em,p,h2,h3,h4,sup,sub,ul,ol,li"
            external_link_list_url: "/admin/tinymce/link-list"

2.

genemu_form:
    recaptcha:
        enabled: false
    tinymce:
        enabled: true
        theme: advanced
        configs:
            theme_advanced_buttons1: "bold,italic,sub,sup,|,bullist,numlist,|,undo,redo,|,pastetext,pasteword,|,formatselect,|,link,unlink,|,cleanup"
            theme_advanced_buttons2: ""
            theme_advanced_buttons3: ""
            theme_advanced_buttons4: ""
            theme_advanced_toolbar_location: "top"
            theme_advanced_toolbar_align: "left"
            theme_advanced_statusbar_location: "bottom"
            theme_advanced_resizing: true
            theme_advanced_blockformats: "p,h2,h3,h4"
            skin : "thebigreason"
            width : "700"
            height: "250"
            valid_elements : "a[href|target=_blank],strong,em,p,h2,h3,h4,sup,sub,ul,ol,li"
            external_link_list_url: "/admin/tinymce/link-list"

3.

genemu_form:
    recaptcha:
        enabled: true
        public_key:  '%recaptcha_public_key%'
        private_key: '%recaptcha_private_key%'
        validation:
            host:                 www.google.com
            port:                 80
            path:                 /recaptcha/api/verify
            timeout:              10
    tinymce:
        enabled: true
        theme: advanced
        configs:
            theme_advanced_buttons1: "bold,italic,sub,sup,|,bullist,numlist,|,undo,redo,|,pastetext,pasteword,|,formatselect,|,link,unlink,|,cleanup"
            theme_advanced_buttons2: ""
            theme_advanced_buttons3: ""
            theme_advanced_buttons4: ""
            theme_advanced_toolbar_location: "top"
            theme_advanced_toolbar_align: "left"
            theme_advanced_statusbar_location: "bottom"
            theme_advanced_resizing: true
            theme_advanced_blockformats: "p,h2,h3,h4"
            skin : "thebigreason"
            width : "700"
            height: "250"
            valid_elements : "a[href|target=_blank],strong,em,p,h2,h3,h4,sup,sub,ul,ol,li"
            external_link_list_url: "/admin/tinymce/link-list"

Config 2 complained that I need to setup a public key, so I used the next config and went back to square 1.

Please advice.

bamarni commented 8 years ago

Yeah we're still not fully compatible with symfony 3 😅

Just pushed some fixes for the error you're getting. Otherwise, tinymce is probably broken with symfony3, it requires some changes, similar to those ones (https://github.com/genemu/GenemuFormBundle/commit/509f3d5115f662056141b4c8351188b55be9c9fe).

I'd suggest not to use tinymce through this bundle as it is planned for removal in version 4 (see https://github.com/genemu/GenemuFormBundle/blob/master/UPGRADE%203.0.md for more information). If you want a smooth transition, feel free to submit a PR to fix tinymce so you can still use it in genemu v3.