I’ve been running into issues trying to upgrade EE from 2.11.9 to 3.5.17. My environment uses PHP 7.0 and MySQL 5.7.24.
I’ve been following Upgrading from ExpressionEngine 2. I’ve tried it two ways 1) Leaving my add-ons in the codebase to update after the core upgrade and 2) uninstalling and removing the add-ons prior to the upgrade. In both situations I ran into the same error:
Fatal error: Uncaught Error: Class 'EllisLab\ExpressionEngine\Model\Log\CpLog' not found in /Users/bryanbraun/Code/sparkbox/seesparkbox.com/ee/system/ee/EllisLab/ExpressionEngine/Service/Model/MetaDataReader.php:62 Stack trace: #0 /Users/bryanbraun/Code/sparkbox/seesparkbox.com/ee/system/ee/EllisLab/ExpressionEngine/Service/Model/Relation/Relation.php(62): EllisLab\ExpressionEngine\Service\Model\MetaDataReader->getPrimaryKey() #1 /Users/bryanbraun/Code/sparkbox/seesparkbox.com/ee/system/ee/EllisLab/ExpressionEngine/Service/Model/RelationGraph.php(254): EllisLab\ExpressionEngine\Service\Model\Relation\Relation->__construct(Object(EllisLab\ExpressionEngine\Service\Model\MetaDataReader), Object(EllisLab\ExpressionEngine\Service\Model\MetaDataReader), 'CpLogs', Array) #2 /Users/bryanbraun/Code/sparkbox/seesparkbox.com/ee/system/ee/EllisLab/ExpressionEngine/Service/Model/RelationGraph.php(103): EllisLab\ExpressionEngine\Service\Model\RelationGraph->makeRelation('ee:Site', 'CpLogs') #3 /Users/bryanbraun/Code/sparkbox/seesparkbo in /Users/bryanbraun/Code/sparkbox/seesparkbox.com/ee/system/ee/EllisLab/ExpressionEngine/Service/Model/MetaDataReader.php on line 62
Most recently, I’ve been hitting this error during the “Run Upgrade” step (where you visit /admin.php and click the “Run Upgrade” button). It starts out ok, successfully stepping through each of the versions it’s upgrading until I get this fatal error somewhere around 3.0.5 or 3.0.6.
I’m not sure how to debug the issue since it’s mostly pointing to core code. Any thoughts on how I can move forward?
Ok, so, I finally figured out what was going on and I wanted to report back in case it helps anyone else.
First, I was attempting to replace my add-on with their upgraded versions after the core upgrade script ran. I needed to do it before the core upgrade script, and I missed that step in the upgrade guide. This wasn’t the cause of the errors, but it did add some noise to the process.
The root cause was this:
I was using .git, and my .gitignore file contained a line saying “log”. This was an old instruction we had added a while back to ignore a folder of logfiles (which no longer existed). HOWEVER, EE3 core includes a folder named “Log”, which contains important application code. This folder was being accidentally ignored. Thus, whenever I tried to deploy or switch branches with git, this code wasn’t being moved properly.
So glad it’s all working as expected now. ?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.