cookie-consent-bundle
cookie-consent-bundle copied to clipboard
Unrecognized option "resource" under "ch_cookie_consent"
Hello, beginner question: I have followed the installation instructions and i get:
Unrecognized option "resource" under "ch_cookie_consent"
I am running Symfony 3.4.49. My app/config/routing.yml has this related entry:
ch_cookie_consent: resource: "@CHCookieConsentBundle/Resources/config/routing.yaml"
Of course if i remove this entry from the config.yml I get:
Unable to generate a URL for the named route "ch_cookie_consent.show" as such route does not exist.
Any help would be appreciated. Thank you.
Same problem here... one year later and nobody replied? How disappointing...
Try to add
ch_cookie_consent:
resource: "@CHCookieConsentBundle/Resources/config/routing.yaml"
in config/routes.yaml
instead of app/config/routing.yml
or alternatively in config/routes/ch_cookie_consent.yaml
Now you can test routes by running php bin/console debug:router
and you should see the routes :
-------------------------------------------------- --------------------- -------- ------ ------------------------------------------------
Name Method Scheme Host Path
-------------------------------------------------- --------------------- -------- ------ ------------------------------------------------
ch_cookie_consent.show ANY ANY ANY /cookie_consent
ch_cookie_consent.show_if_cookie_consent_not_set ANY ANY ANY /cookie_consent_alt