Magentoerpconnect attribute data corruption
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Magento OpenERP Connector |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
This is one of the most serious bugs I have seen in the connector. Everyone who uses trunk is impacted. The bug. Core magento attributes are corrupted if altered or deleted. Corruption is irreversible. Let me explain and tell how to reproduce.
Start with fresh OpenERP 6.1 database. Use extra-trunk extra addons, 6.1 addons, openerp-server 6.1, magentoerpconnect trunk.
Sync the ERP with your favorite demo magento site, 1.4, 1.5, 1.6, whatever.
Import the steps, products, attirbutes, blah blah.
Click on a product, Open Magento Fields. You can see "visibility" (Required attibute) by default is set "Catalog, Search". If I open the resource, I can see the configuration, or I can search and see other available items for selection. Great, it works perfectly.
NOW. Go to magentoerpconnect, attributes. DELETE all attributes.
Go and re-sync your site data. Import attributes over again. You see your attributes that were previously deleted, created once again and everything looks fine!
Go back to the same product as before. Open Magento fields. You see that "Catalog, Search" is still selected. If you click the search to see other selections, behold, none exist. My point, once the data has changed, its irreversible and the entire database is corrupted. Re-syncing site data does nothing to correct the problem. it is lost forever. This leads to another bug recently reported, that will actually export this corrupted product to the website successfully but it will not be visible on the admin because the visibility mapping is corrupted.
Even with the current options selected, you cannot export to the website, because the Catalog, Search selected is pointing to a non-existent resource, and even worse, you cannot select any other resource, its broken. Many fields are corrupted, not just visibility.
To cap, Any user using trunk, if they alter their attributes, delete just one, or try to migrate to some other site,they will experience this issue.
This bug exists in server 6.1, and the akretion 6.1 > 6.0 server backport