I’m new to Kirby and currently migrating my site to Kirby. I bought the 2 Blocks theme, installed it locally (MAMP on OSX with PHP 7) and started it up. The theme comes bundled with Kirby 2.1.1.
I then did an update to the current Kirby. I deleted the panel and kirby folders and copied the new version to that location. The website does work fine, but the mentioned link shows an error message:
This page is currently offline due to an unexpected error. We are very sorry for the inconvenience and will fix it as soon as possible.
Also some other pages like tag overviews for tags with a space in it show that error.
I enabled debug mode, but no php errors appear in the logfile.
Do you have any clue how I could fix that problem?
Debug mode is enabled and no error message is displayed on the page or in the php error logfile (which gets written when I test it with other erroneous pages, so the error logging itself works fine).
Yes, debug mode is enabled as a default in that theme’s config.php.
Yes, the text on the webpage still appears,
display_errors is disabled in the php config, an error logfile set and logging of errors is enabled. The logfile gets written when I put an own php page containing errors into the kirby project folder and try to fetch that file.
What exactly does or doesn’t work, a link to a file on localhost is not really that helpful.
You say that the website is working but some links don’t. What is “the website”? Do you mean the start page is working but other pages are not? If so, maybe rewriting is not enabled on your server?
Also, is the .htaccess file up to date? I’m not quite sure when it was changed, but make sure that you are using the latest version of that file as well.
Both do not work, or, to be more precisely, they did not work. They started working yesterday evening, then stopped working and then started working once again and keep working now in the morning. I did not change the configuration (I’m working with content management systems at my day job for the last 20 years and know how problematic that phrase is, but “did not change” really means that I did not change the configuration). I will check it again this evening. Maybe the problem just disappeared…
One thing is still not working and I don’t know if that’s a limitation of Kirby or a bug in the theme: Tags with spaces in them.
There does not seem to be any kind of url encoding involved in the theme’s code, so the “+” seems to come directly from the kirby core (which is only a guess, since I’m new to Kirby).
To make tags with spaces work, you have to urlencode() and urldecode()them. But the tag cloud actually uses url encoding (hence the +), so that’s a bit strange.
What seems to be missing here is the urldecodign.
In the controller or template, it should therefore be decoded:
if($tag = urldecode(param('tag'))) {
// filter collection of posts
}
I´ve got the same issue, would it be possible to get the detailed information from you what the dev guys had done to fix the issue with the 2 blogs theme? I don´t know how what to do with the rawurlencode - information in your post.