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

Double slash in url error #300

Closed
rjspencer opened this issue Sep 4, 2015 · 2 comments
Closed

Double slash in url error #300

rjspencer opened this issue Sep 4, 2015 · 2 comments

Comments

@rjspencer
Copy link

Love building in Grav. Just launched a site and one of the marketing guys dropped the url into a social tool called Buffer. The url he used included .com/ notice the slash. Buffer shortened the url before posting it. The shortened url had an extra slash added to it .com//?utm=, causing a Fatal Exception error.

The issue only seems to happen if right after the tld.
Error: .com//?utm=
No error .com/page//?utm=

[2015-09-04 21:20:48] grav.CRITICAL: Undefined index: path - Trace: #0 /var/www/host/new-www.everspringpartners.com/www/system/src/Grav/Common/Grav.php(432): Whoops\Run->handleError(8, 'Undefined index...', '/var/www/host/n...', 432, Array) #1 /var/www/host/new-www.everspringpartners.com/www/system/src/Grav/Common/Grav.php(129): Grav\Common\Grav->fallbackUrl(NULL, '//?utm_content=...') #2 /var/www/host/new-www.everspringpartners.com/www/vendor/pimple/pimple/src/Pimple/Container.php(112): Grav\Common\Grav::Grav\Common{closure}(Object(Grav\Common\Grav)) #3 /var/www/host/new-www.everspringpartners.com/www/system/src/Grav/Common/Twig/Twig.php(303): Pimple\Container->offsetGet('page') #4 /var/www/host/new-www.everspringpartners.com/www/system/src/Grav/Common/Grav.php(143): Grav\Common\Twig\Twig->processSite(NULL) #5 /var/www/host/new-www.everspringpartners.com/www/vendor/pimple/pimple/src/Pimple/Container.php(112): Grav\Common\Grav::Grav\Common{closure}(Object(Grav\Common\Grav)) #6 /var/www/host/new-www.everspringpartners.com/www/system/src/Grav/Common/Grav.php(231): Pimple\Container->offsetGet('output') #7 /var/www/host/new-www.everspringpartners.com/www/index.php(31): Grav\Common\Grav->process() #8 {main} [] []

@rhukster
Copy link
Member

rhukster commented Sep 4, 2015

Quite strange.. i'm not seeing this on any of my local test setups, nor on getgrav.org:

http://getgrav.org//?utm=something

@rjspencer
Copy link
Author

I can't recreate the error anymore. It must have had something to do with our setup, but I don't know what. We were getting 404s for double slashes directly after the tld, but not later in the url. Fixed that with a redirects: //: / in the site.yaml.

@rhukster rhukster closed this as completed Sep 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants