Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unrecognized option "resource" under "ch_cookie_consent" #99

Open
costash1 opened this issue Jun 16, 2021 · 2 comments
Open

Unrecognized option "resource" under "ch_cookie_consent" #99

costash1 opened this issue Jun 16, 2021 · 2 comments

Comments

@costash1
Copy link

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.

@TheAFOGroup
Copy link

Same problem here... one year later and nobody replied? How disappointing...

@webmix
Copy link

webmix commented Feb 13, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants