-
-
Notifications
You must be signed in to change notification settings - Fork 50
500 Internal Server Error due to dash in cookie consent route prefix #64
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
Comments
Dashes should not cause any problems in slugs. I think you have something else going on. Did you have a look at the details of the error? |
This was the only error I got, everything else worked fine. No other warnings either. In Laravel 10 with an older project this issue did not arise, so maybe it's related to some change in Laravel 11, either way the above change fixed it in my case. You are right, the slug shouldn't cause any issues, but for some reason it solved the issue. |
Thanks for your response, @captainscorch. I'm not able to reproduce this issue on a L11 installation either, so if you could still post your full error log here maybe we can have a better look at the issue. Thanks! |
@toonvandenbos thanks for pushing on this, I did some more testing locally and was able to fix the issue without the slug change, it was an issue related to my local Vue / Inertia codebase, totally unrelated to the package. I verified this on a new Laravel 11 installation as well. I will close this Issue now, thanks again! |
Issue Description
The default configuration for the cookie consent url/route prefix includes a dash character, which causes a 500 Internal Server Error when trying to load the cookie consent script, which then causes the buttons to not work anymore, making the consent banner unusable.
Current Behavior
When attempting to load the cookie consent script, the following error occurs:
When attempting to click on the buttons, the following error occurs:
Expected Behavior
The cookie consent script should load without any errors and the buttons should not throw an error and close the consent banner after the action.
Steps to Reproduce
Proposed Fix
Change the default prefix in
config/cookieconsent.php
from:to:
Additional Context
This issue affects the default configuration. Users who have published and modified their configuration may not experience this problem if they've already changed the prefix.
Environment
The text was updated successfully, but these errors were encountered: