xcoreplatform / magento2-restapi

Extension needed for the Magento 2 xCore connector
https://xcore.nl
MIT License
12 stars 10 forks source link

Setup:upgrade The attribute group ID is incorrect. Verify the ID and try again. #33

Closed jeroenbalk-adwise closed 2 years ago

jeroenbalk-adwise commented 3 years ago

Hi we are experiencing errors with running setup:upgrade upon installing the module: Module 'Dealer4dealer_Xcore': Upgrading data... The attribute group ID is incorrect. Verify the ID and try again.

This occurs when the database contains attributes/groups migrated (with the official tool) from a Magento1 installation. I've found out the fix is pretty easy, as the error tells there is no fallback found for customer attribute group to assign the new attributes in your UpgradeData.php to.

Can you add group => 'xxx' or any other groupname to the addAttribute calls in UpgradeData.php ? It just needs to be defined.

We would love to see an update on short term, since one of our mutual clients is readying their Exact environment.

Thanks,

Jeroen Balk Adwise - Your Digital Brain

HenriNijborg commented 3 years ago

Unfortunately we can't change it on short term. All changes need to be tested which will take time. The suggested fix won't be a solution as it is actually checked if the group exists by searching for it in the Magento 2 database to retrieve the corresponding id. There is a fallback to the general group and in your case the general group is missing, probably due to the import tool? Maybe you can add the group as Magento 2 relies on it to exist?

tschirmer commented 1 year ago

This happens be attribute set creates occasionally fail to associate the skeleton attribute groups + attributes when created in the default Magento 2 rest api. You can test this by lining up 20 or 30 attribute sets to be created, via the rest api. It's happening all the time with the syncing software we're building, quite annoying.