Upgrade to Kirby 3 | NotFoundException / The home page does not exist

Hey there, I am trying to upgrade my Kirby 2 page to Kirby 3 on a local machine (using MAMP 5.2). I followed the instructions, but now that I try to access the page in a browser, I get into the debug mode (I have to admit that I am not at all familiar with this) and the following error message:

Kirby \ Exception \ NotFoundException
The home page does not exist

As far as I can tell, most issues occur within the kirby/src folder.

Does anyone have an idea how to fix this? Thanks in advance!

Does the page content/home exist? If you had a custom homepage set in Kirby 2, you need to do the same in Kirby 3.

Yes, I am using a custom homepage. The code in the config.php looked like this:

c::set('home', 'arbeiten');

But when I replace it with

return [
  'home' => 'arbeiten'
];

I still get the same error message …

Do you happen to have more than one return statement in your config?

This is what my config.php looks like:

/* Languages */

c::set('languages', array(
  array(
    'code'    => 'de',
    'name'    => 'DE',
    'default' => true,
    'locale'  => 'de_DE',
    'url'     => '/',
  ),
  array(
    'code'    => 'en',
    'name'    => 'EN',
    'locale'  => 'en_US',
    'url'     => '/en',
  ),
));

/* Debug Mode */

return [
    'debug'  => true,
];

/* Alternate Home Directory */

return [
  'home' => 'arbeiten'
];

The c::set() syntax is no longer valid.

And you can’t have multiple return statements:

/* Debug Mode */
return [
    'debug'  => true,
    'home' => 'arbeiten'
];

https://www.php.net/manual/en/function.return.php

That was indeed the problem, as I know understand. Thank you very much for your help!