hipay / hipay-fullservice-sdk-magento2

Official repository of the HiPay Fullservice extension for Magento v2.
https://developer.hipay.com/doc/hipay-fullservice-sdk-magento2/
Apache License 2.0
10 stars 16 forks source link

Undefined index: mage_catalog_category_entity #116

Closed syno-rdo closed 5 years ago

syno-rdo commented 5 years ago

Context

Issue

Full Description

Good Morning,

I'm trying to migrate one of our project from magento 2.1.9 to 2.3.

I'm having a weird error related to _hipay_cart_mapping_categories when trying to launch the command bin/magento setup:upgrade_.

Undefined index: mage_catalog_category_entity in path_to_ptoject/vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php on line 155.

mage_catalog_category_entity is referenced in \HiPay\FullserviceMagento\Setup\UpgradeSchema as a foreign key target. There is not table with name mage_catalog_category_entity , did you want to target catalog_category_entity instead ?

It seems Magento 2.3 is making additionnal checks to validate database integrity.

Please find below some information that can help you detect / resolve the incident.

\Magento\Setup\Console\Command\UpgradeCommand::execute \Magento\Setup\Model\Installer::installSchema \Magento\Setup\Model\Installer::declarativeInstallSchema \Magento\Setup\Model\DeclarationInstaller::installSchema \Magento\Framework\Setup\Declaration\Schema\SchemaConfig::getDbConfig \Magento\Framework\Setup\Declaration\Schema\Db\SchemaBuilder::build \Magento\Framework\Setup\Declaration\Schema\Db\SchemaBuilder::processReferenceKeys \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\DbSchemaReader::readReferences \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\DbSchemaReader::getCreateTableSql

Best Regards

legithubdeaymeric commented 5 years ago

Hello,

You are right, there is indeed an error in the file UpgradeShema on the name of the entity which is filled with the prefix "mage". However, the constraint in the database is correct. The error should probably come from the static analysis that is done by magento on the upgrade system.

However, we can not reproduce the warning during a version upgrade or during a module installation on a magento 2.3 probably due to an error reporting configuration but we are not sure.

We will therefore make a release to correct this problem.

To quickly unblock you can directly edit the two references in the file or apply the patch. https://github.com/hipay/hipay-fullservice-sdk-magento2/commit/d101181ed77b75bcbab4b4ad5364d2436f0f1de9

legithubdeaymeric commented 5 years ago

Hello,

Version 1.4.1 is out now ! https://github.com/hipay/hipay-fullservice-sdk-magento2/releases/tag/1.4.1

If you still have a problem do not hesitate to contact us.

syno-rdo commented 5 years ago

Hello,

I updated the database constraint and it fixed the issue.

Thanks you for the new version.

Best Regards,