0

Recently I migrate a site to Magento 2.3.2. composer update run fine and without a problem. But, when I run a php bin/magento setup:upgrade it throws this error:

Column not found: 1054 Unknown column 'entity_id' in 'OLD', query was: DELETE FROM catalog_category_entity_text WHERE (row_id = 472) AND (attribute_id = '44') AND (store_id = '0')

The error is thrown I think when it is trying to install Magento_CatalogStaging module:

$ php bin/magento setup:upgrade
Cache cleared successfully
File system cleanup:
/var/www/gnc-2-0.morwi.mx-MIGRATION/generated/code/Composer
/var/www/gnc-2-0.morwi.mx-MIGRATION/generated/code/MSP
/var/www/gnc-2-0.morwi.mx-MIGRATION/generated/code/Magento
/var/www/gnc-2-0.morwi.mx-MIGRATION/generated/code/Symfony
The directory '/var/www/gnc-2-0.morwi.mx-MIGRATION/generated/metadata/' doesn't exist - skipping cleanup
Updating modules:
...
Data install/update:
...
Module 'Magento_GroupedProductStaging':
Module 'Magento_DownloadableImportExport':
Module 'Magento_CatalogStaging':
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entity_id' in 'OLD', query was: DELETE FROM `catalog_category_entity_text` WHERE (row_id = 472) AND (attribute_id = '44') AND (`store_id` = '0')

But I don't understand that it means. The entity_id column is not present anymore on catalog_category_entity_text, and the query the error shows is not using that column. And I don't what OLD means.

How can I debug and fix this error? Any idea?

Thanks.

  • I think you migrated an OpenSource DB in a Commerce installation – vitoriodachef Jul 3 at 16:05
  • @vitoriodachef No, it was a commerce 2.0.4 to commerce 2.3.2 – Eliacim DAVILA - CENSERE Jul 3 at 16:07
  • In 2.3.1 'OLD' is set by an event DELETE in vendor/magento/module-catalog-staging/Model/Mview/View/Attribute/Subscription.php::buildStatement l.92 and used after as $eventType in function buildEntityIdStatementByEventType l.155 to replace a parameter in a vsprintf. I never had this bug but it could be give you an idea, of where to check/put your logs. Oh other way 2.0.4 to 2.3.2 is a big jump, you can try an update to 2.3.0 first and a second update to 2.3.2. – Vinz Jul 3 at 16:09
0

In the end, I take Vinz suggestion about don't make the migration directly from 2.0.4 to 2.3.2, but I was more cautious and I migrate:

2.0.4 -> 2.0.15 -> 2.1.0 -> 2.1.10 -> 2.2.1 -> 2.2.8 -> 2.3.0 -> 2.3.2

I was solving one by one of the problems that were appearing. Maybe it was a little exaggerated, but in the end, it works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.