Statamic with multi sites and eloquent messing up #8548
-
Hi! I'm running into issues with Statamic after migrating an existing site to the database. The migration process worked fine. I see my database tables filled with entries. But when I open the site, the navigation is there, the styling is there, but everything is empty? So my first guess was to look at the control panel. I could not get into the control panel, because of a missing fieldset. There was an error about the seo fieldset coming from the Peak package. That file was there, and it was converted to the database, but somehow not being loaded. So I changed the driver for blueprints to file, and got that working again. Then I noticed I got an error when loading the cp: Call to a member function inDefaultSite() on null. And when I went to collections, there were the 4 collections I expected. But clicking on those collections, gave nothing, just empty results/pages. So now I'm a bit lost, how to get my content back to work normally as before migrating to the database? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
Are you able to provide the full stack trace of this error so we can see where it's coming from?
Are there any errors in the console? |
Beta Was this translation helpful? Give feedback.
-
In config/statamic/eloquent-driver.php just change entries back to 'driver' => 'file', and it will load from the stache instead of eloquent. A full stack trace on the errors would be useful to identify the problem. |
Beta Was this translation helpful? Give feedback.
@ryanmitchell Sorry for the delay, but I've been able to check the database and the issue was within the page ordering in the collection. Changing the order back to normal, where home is the first page (and isn't linked to another page), fixed the issue.
Now I have another issue, but I will open a new post for that (as it is not related to this)