evoWeb / recaptcha

TYPO3 Extension to make use of googles nocaptcha
GNU General Public License v2.0
5 stars 18 forks source link

Finishers won't be called if invisible recaptcha is used #33

Closed ghost closed 4 years ago

ghost commented 4 years ago

Same problem as mentioned in #7 but in different versions.

TYPO3 9.5.14 EXT: form 9.5.14 EXT: recaptcha 9.1.3

My setup / configuration seems to be correct since everything works as expected if a visible captcha is used.

I would appreciate your feedback. Thanks in advance.

garbast commented 4 years ago

Please provide the .form.yaml file, so i can check it in my installation.

ghost commented 4 years ago

Sure. Here is an example setup:

captchaTest.form.yaml

renderingOptions:
  submitButtonLabel: Submit
  useInvisibleRecaptcha: true
type: Form
identifier: captchaTest
label: CaptchaTest
prototypeName: standard
finishers:
  -
    options:
      message: 'Lorem ipsum'
      contentElementUid: ''
    identifier: Confirmation
renderables:
  -
    renderingOptions:
      previousButtonLabel: 'Previous step'
      nextButtonLabel: 'Neue Seite'
    type: Page
    identifier: page-1
    label: Step
    renderables:
      -
        defaultValue: ''
        type: Text
        identifier: text-1
        label: Text
      -
        renderingOptions:
          submitButtonLabel: true
        type: Recaptcha
        identifier: recaptcha-1
        label: reCAPTCHA
        validators:
          -
            identifier: Recaptcha

The confirmation finisher is only used as an example here. Other finishers also won't be called.

This exact form was tested and the problem still occurs,

garbast commented 4 years ago

Took me some time to set up a test environment and it worked as expected. I assume that you did not configured you installation. In special the last part is explicitly explained in the documentation. Why didnt your read it? https://docs.typo3.org/p/evoweb/recaptcha/9.1/en-us/Tutorial/Index.html

In general you always need the key in the constants: plugin.tx_recaptcha.public_key = 6LfAH-UUAAAAAG09z2IO0myU_OQfmxKZYvONazdy plugin.tx_recaptcha.private_key = 6LfAH-UUAAAAAIBscbFPlkURjDjinbOrHWjwHY3E

And for invisible recaptch you need these constants: plugin.tx_recaptcha.include_invisible_recaptcha_callback = 1 plugin.tx_recaptcha.invisible_recaptcha_formname = captchaTest