I keep getting "Homepage could not be loaded" after continuing to work on my project!

Hello everyone! I’m somewhat new to Neos and wanted to set it up on my personal (Windows) PC for the first time to get some experience. I have already managed to set it up using the XAMPP Setup guide from the docs.

And after the setup everything works, and I already started editing my project without problems.

However, everytime I leave, and, for example, come back to it the next day (I start apache and mysql in XAMPP, then run ./flow server:run in my project and sometimes empty the cash after that), I get the Setup page in the Neos frontend with the Error “Homepage could not be loaded. Probably you haven’t imported a site yet”. I have a homepage of course, I was already working on the project!

In the backend I currently get this error: “Call to a member function getContext() on null”, though I am not sure if this was the case the last few times too.

I don’t know how to fix this error (I have tried emptying the cache via command and also by deleting the Data/Temporary folder by hand) and every time I got the error I started a new project because I didn’t know what else to do… I’m on project 5 now. Someone please help me!

I hope this is all the information you need to help me, but if there’s anything important I didn’t say, please tell me so!

(Couldn’t find an “edit” button, sorry.)

Some more info:

  • I have tried ./flow doctrine:migrate, it says there are no migrations
  • I still have the Neos Demo package installed
  • In my DB in the table neos_contentrepository_domain_model_nodedata I can see my home-page (path is “/sites/my-packagename”)
  • ./flow site:list shows my site and package name as expected

and I don’t know if it is important, but here are all the installed packages:

"require": {
        "neos/neos": "~5.1.0",
        "neos/site-kickstarter": "~5.1.0",
        "neos/demo": "~6.1",
        "neos/neos-ui": "~5.1",
        "neos/seo": "~3.0",
        "neos/redirecthandler-neosadapter": "~4.0",
        "neos/redirecthandler-databasestorage": "~4.0",
        "neos/redirecthandler-ui": "~2.0",
        "neos/setup": "@dev",
        "neos/neos-setup": "@dev",
        "my/packagename": "@dev"
    },
    "require-dev": {
        "neos/buildessentials": "@dev",
        "mikey179/vfsstream": "^1.6",
        "phpunit/phpunit": "^8.1",
        "symfony/css-selector": "~2.0",
        "neos/behat": "@dev"
    },

System Log says:
20-03-24 19:06:21 5908 WARNING Neos.Neos Couldn’t load the site node for path “/sites/my-packagename” in workspace “live”. This is probably due to a missing baseworkspace for the workspace of the current user.
20-03-24 19:06:21 5908 DEBUG FrontendNodeRoutePartHandler matchValue(): No site node found for request path “”. No specific domain matched.
20-03-24 19:06:21 5908 CRITICAL Exception #1346950755 in line 94 of C:\xampp\htdocs\mySite5\Data\Temporary\Development\Cache\Code\Flow_Object_Classes\Neos_Flow_Mvc_Routing_DynamicRoutePart.php: Homepage could not be loaded. Probably you haven’t imported a site yet

Because of this I entered ./flow workspace:list and got the following result, which seems correct to me:

±-----------±---------------±--------------±--------------±------------+
| Name | Base Workspace | Title | Owner | Description |
±-----------±---------------±--------------±--------------±------------+
| live | | Live | | |
| user-admin | live | My Name| My Name | |
±-----------±---------------±--------------±--------------±------------+

When I try to publish the live workspace via command I get the same error as in the backend, as described in my original post:

Call to a member function getName() on null

  Type: Error
  File: C:\xampp\htdocs\mySite5\Data\Temporary\Development\Cache\Code\Flow_Object_C
        lasses\Neos_Neos_Command_WorkspaceCommandController.php
  Line: 72

… meaning that $workspace->getBaseWorkspace() returns null.

I hope all or any of this information helps someone to help me, or maybe someone else in the future who happens to stumble across this topic.