Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Bug in blog.md navigation

Started by Muut Archive 11 years ago · 5 replies · 286 views
11 years ago

It looks like -- although not positive -- that there is a bug here. If you download and install Grav; don't change any settings. Then under pages create a new folder called "02.blog"; then upload a file called "blog.md" (wherein the page is also titled "Blog" in the header text); then the clear-cache and refresh the home page so the new page shows in the menu.

Here is where it gets interesting ... browse to the new "Blog" page and check the link under the current "GRAV" logo. Clicking on the GRAV logo It is suppose to take you to the root page (home in this case), but instead it wants to take you to the "Blog" page which is your current location.

I've tested this with other pages and it seems to only be a problem when the uploaded page is named "blog.md". Can anyone else confirm this?

11 years ago

Yes, does look like a little bug. Basically the partials/base.html.twig file sets up the logo link like this:

HTML
<div id="logo">
    <h3><a href="{{ base_url == '' ? '/' : base_url }}">{{ config.site.title }}</a></h3>
</div>

However, in the blog.html.twig file which is used to render the blog, that same base_url variable is overriden with the page.url variable. Hence the problem. I guess this needs to be looked at/fixed.

11 years ago

Ok, originally I thought I thought it was something I did in my site, but I couldn't find an option I might have changed to cause it, so I began to eliminate things.

I'll ignore it for now until the fix. THX!

11 years ago

Just a reminder ... doesn't look like this is fixed yet? ... I can post the issue on GitHub if you like?

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1333 9 years ago
Archive · by Muut Archive, 9 years ago
2 924 9 years ago
Archive · by Muut Archive, 9 years ago
2 4055 9 years ago
Archive · by Muut Archive, 9 years ago
1 2933 9 years ago
Archive · by Muut Archive, 9 years ago
3 1110 9 years ago