aradianoff / recaptchacontact

reCaptcha Contact Plugin for Grav CMS (getgrav.org)
MIT License
8 stars 12 forks source link

Error in Admin UI #53

Open BernhardSchlegel opened 4 years ago

BernhardSchlegel commented 4 years ago

Hey guys,

I get an GRAV.FORM.VALIDATION_FAIL grecaptcha_callback is not defined in blueprints error right after installing and clicking save for the first time. What am I doing wrong?

recaptcha: v.2.1.2. Grav v1.6.21 Admin v1.9.12

Thanks!

LadislavCmel commented 4 years ago

Hello, I have the same problem, did you found any solution? Thanks.

BernhardSchlegel commented 4 years ago

Nope, not yet.

Karmalakas commented 3 years ago

With plugin enabled, when I go to single page (eg. Home) editing, I get this:

Twig \ Error \ RuntimeError
An exception has been thrown during the rendering of a template ("Cannot load blueprint blueprints://flex-objects/pages.yaml: Failed to read [LOCAL_PATH]/user/plugins/recaptchacontact/blueprints/default.yaml: Non-string keys are not supported. Quote your evaluable mapping keys instead at line 26 (near "false: PLUGIN_ADMIN.DISABLED").").

Previous exceptions
Cannot load blueprint blueprints://flex-objects/pages.yaml: Failed to read [LOCAL_PATH]/user/plugins/recaptchacontact/blueprints/default.yaml: Non-string keys are not supported. Quote your evaluable mapping keys instead at line 26 (near "false: PLUGIN_ADMIN.DISABLED"). (500)
Failed to read [LOCAL_PATH]/user/plugins/recaptchacontact/blueprints/default.yaml: Non-string keys are not supported. Quote your evaluable mapping keys instead at line 26 (near "false: PLUGIN_ADMIN.DISABLED"). (500)
Non-string keys are not supported. Quote your evaluable mapping keys instead at line 26 (near "false: PLUGIN_ADMIN.DISABLED"). (0)

Replaced paths with [LOCAL_PATH]

quorumini commented 2 years ago

Old thread, but since no one answered. I changed this in [LOCAL_PATH]/user/plugins/recaptchacontact/blueprints/default.yaml

              options:
                0: PLUGIN_ADMIN.DISABLED
                1: PLUGIN_ADMIN.ENABLED

Before that under options it was:

              options:
                false: PLUGIN_ADMIN.DISABLED
                true: PLUGIN_ADMIN.ENABLED
vm75 commented 2 years ago

@quorumini, your fix works. Please create a pull request

mzryz commented 2 years ago

Could someone please integrate this fix? It has been an entire year already.

rexxmagnus commented 11 months ago

I'd like to point out that recaptcha is now built into the core forms plugin (at least as of v7.2.1) and an example is in the documentation here https://learn.getgrav.org/16/forms/forms/example-form