Upgrade to 5.6 is broken by images in blocks


Upgrading to pimcore 5.6 breaks on two different Pim installations and can be reproduced. The problem seems to exist within the migrations.

It seems to happen when you have a block types. We have a Product class with a “videos” block and an “images” block in which you can add videos and images respectively. When upgrading through composer everything goes fine until the migrations are kicked off.

in object_query_3 (the product table) it says it can’t drop the videos column. However before the upgrade there actually was a videos column. So it seems that two migrations try to remove the same column, and fail the second time. Because looking at the table after it failed, the videos column isn’t there anymore.

Any ways to fix this?


It’s a caching issue. And nope, no solution from pimcore side.


Your problem seems to come from object bricks though, not from blocks. I’ve read the thread, but I’m not sure whether our problem is 100% the same. Yours seems to pop up when you do a classes-rebuild. Ours comes from the upgrade migrations. Could you provide a bit more information on where exactly in the code this breaks?


@david-qlf actually - we have the same issue with blocks…

There is still no solution but recently I managed it to reconstruct and isolate the issue, so we’re finally able to reproduce it…

Here’s the “Walkthrough”:


I still don’t think so. My problem was solved by running the migrations in isolation one by one.


Yes, thats exactly the issue @solverat said here. Running the migrations one by one solves it. The problem is the runtime cache of pimcore. When you run them one-by-one, you don’t run into cache mismatch and thus it works.