Error Upgrading from 8.3.2 to 8.4.1 - Unknown column 'cvPublishEndDate' in 'where clause'"

Permalink
Manually upgrading a site like I always prefer using smylinks gives the following error - I was of course logged in as super admin and had no cache enabled:

Doctrine\DBAL\Exception\InvalidFieldNameException thrown with message "An exception occurred while executing 'select * from CollectionVersions where cID = ? and cvIsApproved = 1 and (cvPublishDate is not NULL or cvPublishEndDate is not null) limit 1' with params ["141"]:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'cvPublishEndDate' in 'where clause'"

Stacktrace:
#27 Doctrine\DBAL\Exception\InvalidFieldNameException in /841/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:71
#26 Doctrine\DBAL\Driver\AbstractMySQLDriver:convertException in /841/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:128
#25 Doctrine\DBAL\DBALException:driverExceptionDuringQuery in /841/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:855
#24 Doctrine\DBAL\Driver\PDOException in /841/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:107
#23 PDOException in /841/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105
#22 PDOStatement:execute in /841/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105
#21 Doctrine\DBAL\Driver\PDOStatement:execute in /841/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:849
#20 Doctrine\DBAL\Connection:executeQuery in /841/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:510
#19 Doctrine\DBAL\Connection:fetchAssoc in /841/concrete/src/Page/Collection/Version/Version.php:119
#18 Concrete\Core\Page\Collection\Version\Version:get in /841/concrete/src/Http/ResponseFactory.php:285
#17 Concrete\Core\Http\ResponseFactory:collection in /841/concrete/src/Routing/DispatcherRouteCallback.php:34
#16 Concrete\Core\Routing\DispatcherRouteCallback:execute in /841/concrete/src/Http/DefaultDispatcher.php:130
#15 Concrete\Core\Http\DefaultDispatcher:handleDispatch in /841/concrete/src/Http/DefaultDispatcher.php:57
#14 Concrete\Core\Http\DefaultDispatcher:dispatch in /841/concrete/src/Http/Middleware/DispatcherDelegate.php:39
#13 Concrete\Core\Http\Middleware\DispatcherDelegate:next in /841/concrete/src/Http/Middleware/ThumbnailMiddleware.php:71
#12 Concrete\Core\Http\Middleware\ThumbnailMiddleware:process in /841/concrete/src/Http/Middleware/MiddlewareDelegate.php:38
#11 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /841/concrete/src/Http/Middleware/FrameOptionsMiddleware.php:39
#10 Concrete\Core\Http\Middleware\FrameOptionsMiddleware:process in /841/concrete/src/Http/Middleware/MiddlewareDelegate.php:38
#9 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /841/concrete/src/Http/Middleware/CookieMiddleware.php:37
#8 Concrete\Core\Http\Middleware\CookieMiddleware:process in /841/concrete/src/Http/Middleware/MiddlewareDelegate.php:38
#7 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /841/concrete/src/Http/Middleware/ApplicationMiddleware.php:29
#6 Concrete\Core\Http\Middleware\ApplicationMiddleware:process in /841/concrete/src/Http/Middleware/MiddlewareDelegate.php:38
#5 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /841/concrete/src/Http/Middleware/MiddlewareStack.php:86
#4 Concrete\Core\Http\Middleware\MiddlewareStack:process in /841/concrete/src/Http/DefaultServer.php:85
#3 Concrete\Core\Http\DefaultServer:handleRequest in /841/concrete/src/Foundation/Runtime/Run/DefaultRunner.php:119
#2 Concrete\Core\Foundation\Runtime\Run\DefaultRunner:run in /841/concrete/src/Foundation/Runtime/DefaultRuntime.php:102
#1 Concrete\Core\Foundation\Runtime\DefaultRuntime:run in /841/concrete/dispatcher.php:36
#0 require in /58/index.php:3

jasteele12
 
mlocati replied on at Permalink Reply
mlocati
You can try to force the upgrade process by running this command in a terminal shell:

./concrete/bin/concrete5 c5:update --rerun
jasteele12 replied on at Permalink Reply
jasteele12
I tried the ?force=1 twice in the browser (after restoring the database) - neither time did that work. Luckily this was just one of my test installs.

I have a client who wants me to upgrade their site to 8.4.1 and this has me a bit scared.

How does the above process differ?

More importantly, why is this error happening in the first place?
mlocati replied on at Permalink Reply
mlocati
In concrete5 version 8 it's absolutely useless to visit the /ccm/system/upgrade URL (even with the force parameter).
The upgrade process will be performed automatically when you visit the website for the first time.

To force the re-execution of the applicable migration scripts you really need to open a terminal console, cd to the webroot directory and enter the command
./concrete/bin/concrete5 c5:update --rerun

To understand why is this error happening I'd need a copy of your database.
jasteele12 replied on at Permalink Reply
jasteele12
The "automatic" upgrade has me even more scared. Can you point me to where this happens?

I've convinced this client to hold off until the 8.4.2 release. Unfortunately, there is a bunch of confidential info in the database - I'm sure you are busy too.

FYI - the only overrides from the 8.3.2 stock install are the Stucco theme and a custom review package that I wrote for this client.
mlocati replied on at Permalink Reply
mlocati
> I've convinced this client to hold off until the 8.4.2 release.

I don't think that this issue has been already fixed, so you'll have this problem in 8.4.2 too.
tduncandesign replied on at Permalink Reply
tduncandesign
mlocati, thanks for this, saved my update!