excelwebzone / EWZRecaptchaBundle

This bundle provides easy reCAPTCHA form field for Symfony.
MIT License
396 stars 160 forks source link

InvalidConfigurationException The child node "public_key" at path "ewz_recaptcha" must be configured. #213

Open ghost opened 6 years ago

ghost commented 6 years ago

I got this error, i added site key and secret key in .env file. I use symfony4.

 InvalidConfigurationException
The child node "public_key" at path "ewz_recaptcha" must be configured.

Please help

elvismdev commented 5 years ago

@mn000 You need to add the configuration file for the bundle yourself first. Add it inside config/packages directory (e.g. config/packages/ewz_recaptcha.yaml). And add the needed config inside there:

ewz_recaptcha:
  public_key: '%env(GOOGLE_RECAPTCHA_SITE_KEY)%'
  private_key: '%env(GOOGLE_RECAPTCHA_SECRET)%'
  locale_key:  '%kernel.default_locale%'
  locale_from_request: true
  # ajax: true
  # enabled: false
  # verify_host: true

Then re-run the bundle installation from composer.