Apache on windows has a known bug/issue with colons in the URL.
https://bz.apache.org/bugzilla/show_bug.cgi?id=41441
Any chance that a future version of Grav might use a different serperator?
Best regards
Thomas
Let me investigate a little...
Well I can reproduce it, and yes, I can see extensive comments on this on the net. Unfortunately this is not a trivial thing to change. it's somewhat embedded in Grav and a change could impact lots of Grav installations. I looked at the ability to have this configurable, but even that is not trivial a thing. I'm going to continue to look for workarounds however...
Many thanks! Here is my list of modifications to replace colon (:) with semicolon (;) as separator in Grav v0.9.17
system\src\Grav\Common\Uri.php line 81 - 86
if (strpos($uri, ';')) {
$bits = explode('/', $uri);
$path = array();
foreach ($bits as $bit) {
if (strpos($bit, ';') !== false) {
$param = explode(';', $bit);
user\plugins\pagination\classes\paginationhelper.php line 53
$this->items[$x] = new PaginationPage($x, '/page;'.$x);
And in the twig file of my theme:
user hemes
otepad emplates\partials\article.html.twig line 27
{% for tag in post.taxonomy.tag %}<span class="post-tag-{{tag}}"><a href="{{ home.url }}/tag;{{ tag }}">{{ tag }}</a></span>{%if not loop.last %} {% endif %},{% endfor %}
There maybe more but it works for 'page:' and 'tag:'
Ok, I think I have a good solution for this. Basically i've made this separator configurable. It will default to : as this works for most scenarios, but you can change it to ; or ~, or whatever char works best for you. unfortunately this means a bunch of plugins and themes will get updated to provide support for the dynamic variable. However, because we are defaulting to : still, it should be a pretty painless experience.
I remember this bug, it's for windows only and working only in the first segment, if you put the grav site inside a folder, example you have
http://localhost/grav/foo:bar
this not get any error to apache windows.
I have already investigate in the past for this choice to use a vagrant machine and remove all the possible bugs into windows machine :P
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 0 | 1322 | 9 years ago | ||
| 2 | 917 | 9 years ago | ||
| 2 | 4048 | 9 years ago | ||
| 1 | 2922 | 9 years ago | ||
| 3 | 1106 | 9 years ago |