Call to a member function getSiteTree() on null

I’m trying to copy a website running on Concrete5 version 8.2.1 to a new server. The first few issues I had were:

  • pdo_mysql not installed - fixed
  • some errors relating to capitalisation of table names - manually renamed them

Now I am getting this error and I am unsure how to proceed:

Error thrown with message “Call to a member function getSiteTree() on null”

Stacktrace:
#22 Error in /home/xxxxxx/public_html/updates/concrete5-8.2.1_remote_updater/concrete/src/Entity/Site/Site.php:191
#21 Concrete\Core\Entity\Site\Site:getSiteTreeObject in /home/xxxxxx/public_html/updates/concrete5-8.2.1_remote_updater/concrete/src/Entity/Site/Site.php:196
#20 Concrete\Core\Entity\Site\Site:getSiteHomePageObject in /home/xxxxxx/public_html/updates/concrete5-8.2.1_remote_updater/concrete/src/Page/Page.php:402
#19 Concrete\Core\Page\Page:getFromRequest in /home/xxxxxx/public_html/updates/concrete5-8.2.1_remote_updater/concrete/src/Routing/DispatcherRouteCallback.php:32
#18 Concrete\Core\Routing\DispatcherRouteCallback:execute in /home/xxxxxx/public_html/updates/concrete5-8.2.1_remote_updater/concrete/src/Http/DefaultDispatcher.php:122
#17 Concrete\Core\Http\DefaultDispatcher:handleDispatch in /home/xxxxxx/public_html/updates/concrete5-8.2.1_remote_updater/concrete/src/Http/DefaultDispatcher.php:54
#16 Concrete\Core\Http\DefaultDispatcher:dispatch in /home/xxxxxx/public_html/updates/concrete5-8.2.1_remote_updater/concrete/src/Http/Middleware/DispatcherDelegate.php:39
#15 Concrete\Core\Http\Middleware\DispatcherDelegate:next in /home/xxxxxx/public_html/updates/concrete5-8.2.1_remote_updater/concrete/src/Http/Middleware/ThumbnailMiddleware.php:60
#14 Concrete\Core\Http\Middleware\ThumbnailMiddleware:process in /home/xxxxxx/public_html/updates/concrete5-8.2.1_remote_updater/concrete/src/Http/Middleware/MiddlewareDelegate.php:38
#13 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /home/xxxxxx/public_html/updates/concrete5-8.2.1_remote_updater/concrete/src/Http/Middleware/FrameOptionsMiddleware.php:39
#12 Concrete\Core\Http\Middleware\FrameOptionsMiddleware:process in /home/xxxxxx/public_html/updates/concrete5-8.2.1_remote_updater/concrete/src/Http/Middleware/MiddlewareDelegate.php:38
#11 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /home/xxxxxx/public_html/updates/concrete5-8.2.1_remote_updater/concrete/src/Http/Middleware/CookieMiddleware.php:37
#10 Concrete\Core\Http\Middleware\CookieMiddleware:process in /home/xxxxxx/public_html/updates/concrete5-8.2.1_remote_updater/concrete/src/Http/Middleware/MiddlewareDelegate.php:38
#9 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /home/xxxxxx/public_html/updates/concrete5-8.2.1_remote_updater/concrete/src/Http/Middleware/ApplicationMiddleware.php:29
#8 Concrete\Core\Http\Middleware\ApplicationMiddleware:process in /home/xxxxxx/public_html/updates/concrete5-8.2.1_remote_updater/concrete/src/Http/Middleware/MiddlewareDelegate.php:38
#7 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /home/xxxxxx/public_html/updates/concrete5-8.2.1_remote_updater/concrete/src/Http/Middleware/MiddlewareStack.php:86
#6 Concrete\Core\Http\Middleware\MiddlewareStack:process in /home/xxxxxx/public_html/updates/concrete5-8.2.1_remote_updater/concrete/src/Http/DefaultServer.php:85
#5 Concrete\Core\Http\DefaultServer:handleRequest in /home/xxxxxx/public_html/updates/concrete5-8.2.1_remote_updater/concrete/src/Foundation/Runtime/Run/DefaultRunner.php:115
#4 Concrete\Core\Foundation\Runtime\Run\DefaultRunner:run in /home/xxxxxx/public_html/updates/concrete5-8.2.1_remote_updater/concrete/src/Foundation/Runtime/DefaultRuntime.php:102
#3 Concrete\Core\Foundation\Runtime\DefaultRuntime:run in /home/xxxxxx/public_html/updates/concrete5-8.2.1_remote_updater/concrete/dispatcher.php:39
#2 require in /home/xxxxxx/public_html/concrete/bootstrap/configure.php:52
#1 require in /home/xxxxxx/public_html/concrete/dispatcher.php:18
#0 require in /home/xxxxxx/public_html/index.php:2

The following queries all return sensible results:

Select * From sites;
Select * From sitetrees;
Select * From sitelocales;

You might try deleting cache files.

Do you have multisite enabled?

I have tried deleting cache, it didn’t solve the problem. Multisite is not enabled.

I just noticed your table names are all lower case - is this a Concrete site moving from windows to linux? That can cause some issues.