Attempting to refresh my local dev environment with data from production, I restored a production backup to the local database. I encountered this error when trying restart the local site:
“Call to a member function getConfigRepository() on null”
This apparently occurred when trying to retrieve timezone configuration:
From the stack trace:
4 Concrete\Core\Foundation\Runtime\Run\DefaultRunner initializeSiteTimezone
It seems that there may be configuration information in the database that conflicts with my local site. I wondered if there is a way to restore the content data without site configuration that might conflict.
An additional note. It occurs to me that this might be due to a missing file referenced by something in the database. I wonder anyone has a clue for me about configuration associated with site timezone, or any other suggestions to solve this error.
Helpful suggestion. The app.php file is identical with the production site. However, there were some differences in concrete.php and site.php. May be worth a try to synchronize this with the production version. I’ll post my results.
Syncronizing the overides directory and deleting cache directory did not help. Johnthefish was right about it being a secondary error. On closer inspection of the stack trace I see that the exception occurs on:
If you dig through the application/config php file, you can put the database into dev mode and disable caches on your clone. But making a clone without the settings is a better approach.
When cloning a site with many old page versions etc, I also use my Extreme Clean addon to get rid of any history I don’t need for the clone. It can make a big difference to the time to backup, download, import a database.