Tags won't work

Hi there,
I try to create a blog based on Kirby to replace\migrate my Tumblr blog. Currently I use a local installation of XAMP with Kirby 2.4.1 and the Baseblog theme (latest release). Most things work as expected - at least with the help of Google and some try & error I can help myself to get things work :wink:

Unfortunatelly I didnā€™t find a solution for getting tags to work. Currently, when accessing a tag-page Kirby is displaying this error:

IMHO, Kirby should link to kirby/blog/tag:tagname ā€¦ so I tried it myself, but I only received a Error (404).

Iā€™m pretty sure that I didnā€™t have changed anything within the tag-code. To be sure, I even tried a clean ā€œinstallā€ of Kirby and the Baseblog theme, but the behaviour is exactly the same. Can anyone please help me out?

Regards
RenƩ

Sounds as if you have changed the structure of the site without changing the links. In the Baseblog theme, the blog page is the home page, so there would be no ā€œblogā€ in the URLā€¦ Is that so?

http://localhost/kirby directly shows my blog posts. Within that URI there is no /blog (even when I enter http://localhost/kirby/blog it directly forwards to http://localhost/kirby). But every blog post directs to http://localhost/kirby/blog/my-blog-posts-xyz. I changed only a few things (f.e. sorting of blog articles by date) and removed a few static pages from the Baseblog theme (currently I have only one visible static page).

But exactly the same happens with a ā€œcleanā€ install I did that way:

  • Unpack Kirby from kirby-2.4.1.zip to htdocs\kirby2
  • Delete folders assets, content and site
  • Copy folders assets, content and site from the baseblog-master.zip (Version 2.0.3 from Mar 17th, 2015)
  • Load Kirby (localhost\kirby2) and click on a tag - same error (access denied)

Itā€™s normal that a post has the ā€œblogā€ bit in it, you could use a router to get rid of that: you can use a router as explained in the docs: https://getkirby.com/docs/developer-guide/advanced/routing#omitting-the-blog-folder-in-urls.

On windows systems, you have to exchange the colon in the URL with a semicolon or better url::paramSeparator(), so that it works on your remote unix-based system as well.

Thanks, thats also good to know. Does it also help to get working tags?

Played around with different themes (always in a clean install). Tags are broken with every theme I tried. At least, some of the themes showed a 404, but most a access denied. Seems to be more a problem of my Apache on Windows 10?

As I said, replace the colon in the tag links:

e.g. change line 14 of https://github.com/sashtown/baseblog/blob/master/site/templates/article.link.php to

 <li><a href="<?php echo url('tag' . url::paramSeparator()  . urlencode($tag)) ?>">#<?php echo $tag; ?></a></li>

the same for all occurrences of the tag URL in blog.php, article.video.php, article.text.php.

And your tag links should also work on Windows.

Danke fĆ¼r deine ErlƤuterungen. Da der Fehler mit jedem Theme aufgetreten ist, vermutete ich eher eine Fehlkonfiguration des Apache (Windows 10 Ultimate, 64 Bit). Ich habe deshalb Apache nochmal neu aufgesetzt, was den Fehler aber auch nicht behoben hat.

Testhalber habe ich das Projekt dann mal bei meinem Hoster publiziert und dort lief es komplett fehlerfrei. Das nur als Hinweis, fĆ¼r alle die vielleicht Ć¼ber eine Suche auf dieses Problem stoƟen.