Concrete5: 8.5.2RC1 - Fatal error upgrading from 8.4.2

Created on 8 Aug 2019  路  6Comments  路  Source: concrete5/concrete5

We have a site running in 8.4.2 which fails during upgrade to 8.5.x and I just tested 8.5.2RC1 to see if that had fixed the problem which it hasn't.

The site uses Express quite a bit ('flat' objects, not inter-related ones) and the error during upgrade is:
Doctrine \ DBAL \ Exception \ DriverException
An exception occurred while executing 'ALTER TABLE ExpressFormFieldSetAuthorControls ADD CONSTRAINT FK_CF378786BF396750 FOREIGN KEY (id) REFERENCES ExpressFormFieldSetControls (id) ON DELETE CASCADE': SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint
Previous exceptions
SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (HY000)
SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (HY000)

Which would seem to be Express-related

It's hard to say what the steps are to reproduce this other than perhaps create some Express objects then try an upgrade from 8.4.2 to 8.5.x to see if the same occurs.

The immediate issue for us is that the site needs to move to a new home which is running PHP 7.3, currently it is on PHP 7.2 and 8.5.x is required for V7.3.

For further context I attached the crash screenshot.
AwesomeScreenshot-deleteme-focusrite-ath-cx-ccm-system-upgrade-submit-2019-08-08_1_38

C5 Environment during test is unavailable at the moment as the site is bricked following the upgrade failure.

Developers Medium Framework Available Bug

All 6 comments

I think I got the same error on upgrade from 8.4.x to 8.5.1.

What I found-
ExpressFormFieldSetAuthorControls had id with utf8mb4
but
ExpressFormFieldSetControls had id with utf8.

I ran

ALTER TABLE
    ExpressFormFieldSetAuthorControls
    CONVERT TO CHARACTER SET utf8
    COLLATE utf8_unicode_ci;

then, it worked.

I believe this information will help to figure out the issue.

Good spot! Hope this leads to a speedy solution.

This happened to me today going from 8.4.5 to 8.5.1 or 8.5.2

A workaround for this is to follow the command line upgrading instructions:

concrete/bin/concrete5 c5:update

Wait for it to fail, and then run

concrete/bin/concrete5 c5:database:charset:set utf8mb4

And then re-run the command line update again

    concrete/bin/concrete5 c5:update

@aembler thanks for the workaround!

I think that https://github.com/concrete5/concrete5/pull/9113 (and #9146) fixed this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marvinde picture marvinde  路  3Comments

gavthompson picture gavthompson  路  6Comments

shahroq picture shahroq  路  6Comments

acohin picture acohin  路  3Comments

a3020 picture a3020  路  4Comments