Kirby renders only error page after updating to 3.3.1

Hi everyone :slight_smile:

after updating from 3.2.3 to 3.3.1. on my local test setup, my site always renders my error page, no matter which page I try to open. It is a multi-language setup (de and en) and I have no custom fancy routes or something like that.

Any ideas where this problem could be rooted? I don’t know where to search as it doesn’t throw any exception in debug mode – it just renders my custom error page.

Thank you very much in advance!

Have you deleted the media folder after updating? Cleared all session files from /site/sessions and cleared the browser cache?

What does your language setup look like?

Thank you for your answer!

I deleted the media folder, the sessions and my browser cache. Still not working. :frowning:

In my site/languages folder are two files. de.php and en.php

<?php

return [
  'code' => 'de',
  'default' => true,
  'direction' => 'ltr',
  'locale' => 'de_DE',
  'name' => 'Deutsch',
  'url' => '/de',
  'translations' => [
    'readmore' => 'weiterlesen',
    'newsletter' => 'Newsletter',
    'subscribe' => 'Eintragen',
    'email' => 'Email-Adresse',
    'by' => 'von',
    'fontspring' => 'Diese Schrift auf Fontspring kaufen',
  ]
];

<?php

return [
  'code' => 'en',
  'default' => false,
  'direction' => 'ltr',
  'locale' => 'en_US',
  'name' => 'English',
  'url' => '/en',
  'translations' => [
    'readmore' => 'read more',
    'newsletter' => 'Newsletter',
    'subscribe' => 'Subscribe',
    'email' => 'Email Adress',
    'by' => 'by',
    'fontspring' => 'Buy this font on fontspring',
  ]
];

Im not sure if the problem is rooted in the language setup …

No, that looks good. I was just thinking of things where we had changes between 3.2.3 and 3.3.1.

Do you use any plugins?

Yes. I use the kirby-builder by Tim Oetting, the meta-tags plugin by Pedro Borges and the news sitemapper plugin by Cre8iv.

What if you remove them? Or have you updated them all? The meta tags plugin hasn’t been updated in a while…

Removed all plugins, deleted /media and /site/sessions & browser cache. Still not working. Hm …

Let me try to remove all the meta tags stuff from the config file. This will need some time.
I will try to remove everything that could possibly interfere and will reach out to you again. Thank you for now!

If that doesn’t solve your issue, could you please post your config.php (without any sensitive data)?

Unfortunately it still does not work. Here is my config.php

<?php

/*
---------------------------------------
Kirby Configuration
---------------------------------------

By default you don't have to configure anything to
make Kirby work. For more fine-grained configuration
of the system, please check out http://getkirby.com/docs/advanced/options
*/

return [
	'languages' => true,
	'debug' => true,
	
	
	/* Markdown Extra */
	
	'markdown' => [
		'extra' => true
	 ],
	

	/* Routes */
	
	'routes' => [
		[
		  'pattern' => 'logout',
		  'action'  => function() {
	
			if ($user = kirby()->user()) {
			  $user->logout();
			}
	
			go('login');
	
		  }
		]
	  ],
	  
	
	/* Meta Tags Plugin */
	
	'pedroborges.meta-tags.default' => function ($page, $site) {
		return [
			'title' => $page->seoTitle()->isNotEmpty()
				? $site->title() . " – " . $page->seoTitle()
				: $site->title(),
			'meta' => [
				'description' => $page->seoDescription()->isNotEmpty()
					? $page->seoDescription()
					: $site->description(),
				// 'tags' => $site->keywords(),
				'robots' => $page->robotsIndex()->isNotEmpty() || $page->robotsFollow()->isNotEmpty()
					?  $page->robotsIndex()->genrobots() . ", " . $page->robotsFollow()->genrobots()
					:  "noindex, follow",
			],
			'link' => [
				'canonical' => $page->url()
			],
			'og' => [
				'title' => $page->seoTitle()->isNotEmpty()
					? $page->seoTitle()
					: $site->title(),
				'type' => 'website',
				'site_name' => $site->title(),
				'url' => $page->url(),
				'namespace:image' => function($page) {
					$image = $page->teaserimg()->isNotEmpty()
							? $page->teaserimg()->toFile()->resize(600, null)
							: new Asset("assets/images/fallback.png");
				
					return [
						'image' => $image->url(),
						'height' => $image->height(),
						'width' => $image->width(),
						'type' => $image->mime()
					];
				}
			],
			'twitter' => [
				'card' => 'summary',
				'site' => $site->twitter(),
				'title' => $page->seoTitle()->isNotEmpty()
					? $page->seoTitle()
					: $site->title(),
				'namespace:image' => function ($page) {
					$image = $page->teaserimg()->isNotEmpty()
						? $page->teaserimg()->toFile()->resize(600, null)
						: new Asset("assets/images/fallback.png");
					return [
						'image' => $image->url(),
						'alt' => $image->alt()
					];
				}
			]
		];
	},
	
	'pedroborges.meta-tags.templates' => function ($page, $site) {
		return [
			'artikel' => [
				'title' => $page->seoTitle()->isNotEmpty()
					? $page->seoTitle() . " – " . $site->title()
					: $site->title(),
				'meta' => [
					'description' => $page->seoDescription()->isNotEmpty()
						? $page->seoDescription()
						: $site->description(),
					// 'tags' => $site->keywords(),
					'robots' => $page->robotsIndex()->isNotEmpty() || $page->robotsFollow()->isNotEmpty()
						?  $page->robotsIndex()->genrobots() . ", " . $page->robotsFollow()->genrobots()
						:  "noindex, follow",
				],
				'link' => [
					'canonical' => $page->url()
				],
				'og' => [  // tags group name
					'type' => 'article', // overrides the default
					'namespace:article' => [
						'author' => $page->author()->isNotEmpty()
					   		? $page->author()->toUser()->name()
					   		: 'Finaltype',
						'published_time' => $page->date()->toDate('Y-m-d'),
						'modified_time' => $page->modified('Y-m-d'),
						// 'tag' => ['tech', 'web']
					],
					'namespace:image' => function($page) {
						$image = $page->teaserimg()->isNotEmpty()
								? $page->teaserimg()->toFile()->resize(600, null)
								: new Asset("assets/images/fallback.png");
				
						return [
							'image' => $image->url(),
							'height' => $image->height(),
							'width' => $image->width(),
							'type' => $image->mime()
						];
					}
				],
				'twitter' => [
					'card' => 'summary',
					'site' => $site->twitter(),
					'author' => $page->author()->isNotEmpty()
				 		? $page->author()->toUser()->twitter()
				 		: 'Finaltype',
					'title' => $page->seoTitle()->isNotEmpty()
						? $page->seoTitle()
						: $site->title(),
					'namespace:image' => function ($page) {
						$image = $page->teaserimg()->isNotEmpty()
							? $page->teaserimg()->toFile()->resize(600, null)
							: new Asset("assets/images/fallback.png");
					
						return [
							'image' => $image->url(),
							'alt' => $image->alt()
						];
					}
				]
			]
		];
	},
	
];

:cry:

Hm, I currently have no more ideas. How did you update?

I had a look at the recent changelogs and couldn’t detect anything that obviously looks as if it could break your site without an error message, but without knowing the code, it’s hard to tell. If you want, you can send me the code and I can try to find something. But tomorrow, because now is bed time…

And you really get Kirby’s error page template, not a generic 404?

Funny thing: I just went all in and put the new kirby folder on my live server. It just works. No idea whats wrong on my local host. (using MAMP on MacOS).

PHP version is more or less the same. (7.3 on live server, 7.3.1 in MAMP but switching to 7.2.14 does not have any effect). Really weird problem.

Thank you for all your help so far!

For clarification: I get my custom Error page. The same that I would get when there is a 404. So NOT the Kirby debug page, just my custom errorpage.

I updated by downloading the .zip of the 3.3.1. from https://github.com/getkirby/kirby/releases and putting it in my local test installation.

Any new ideas with this information? Otherwise I can send you the code tomorrow.
Thank you and have a good night :slight_smile:

Not really, if it works on the remote server it should also work locally.

What if you download the working version from your remote server, does that work?

I downloaded the working version from the remote server but it also does not work in my local setup. It works on a different remote server, though.

I think it has something to do with routes and my language setup. I downloaded a fresh starter kit and it works well. As soon as I paste my language files (posted the code above) into /site/languages I get the same result als in my project. Always the Error-Page.
I can switch the Kirby folder to an older Kirby version (e.g. 3.2.3) and it just works fine. Even with the languages.

Did you change something in the routing behaviour in 3.3 ? This is a really strange problem.

Thank you for your patience :slight_smile:

I would try to change in the language files e.g.

to

'url' => 'de',

and the same in English.

I don’t know, if this helps, but this is a difference to the docs at https://getkirby.com/docs/guide/languages/introduction#detailed-locale-settings for the german language.

If this don’t helps I would change this back only for the default language.

My next step would be to deactivate Markdown Extra. Then all plugins.

And knowing https://forum.getkirby.com/t/language-code-array-has-weird-index-on-live-server/16495 my first step would be deactivating the Sitemapper plugin by Cre8tive.

Another test can be to set

    'url' => NULL,

in all language files or to deaktivate the url line.

1 Like

The default url setting if you create languages via the Panel is indeed 'url' => NULL. That will use the language code for all languages.

1 Like

Yes! commenting out the url line in the language files did the trick!

// 'url' => "/de",

It now works as expected! I think I will just get rid of the line. Not sure why I added it in the first place, thought its necessary for the multi language setup at that time.

Thank you @HeinerEF and @texnixe for your great help!