Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tables not updating properly after data migration #264

Closed
popatkaran opened this issue Mar 24, 2017 · 17 comments
Closed

Tables not updating properly after data migration #264

popatkaran opened this issue Mar 24, 2017 · 17 comments

Comments

@popatkaran
Copy link

Hello,

I have migrated data from Magento EE 1.12.0.2 to EE 2.1.5.

I have multi store website English and Arabic Language.

Migration are successfully for data of old magento 1 to latest magento 2 version.

In admin panel Its display all store view with different language translation and all customer, Product,Order data.

But when i have checked in front-end its not working and display error like below,

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'main.entity_id' in 'field list', query was: SELECTmain.entity_idFROMcatalog_product_entity_intASmainINNER JOINstoreON main.store_id=store.store_id WHERE (main.attribute_id = '175') AND (store.website_id IN(0, '1')) AND (main.value = '85') AND (main.entity_id IN('2383', '1126', '1172', '2872', '1126', '1172', '2845', '1126', '1172', '2258', '1126', '1172', '2799', '1126', '1172', '2741', '1126', '1172', '4185', '1126', '1172', '3736', '1126', '1172', '2741', '1126'))

I have check report and get that issue can be skipped by disabling Magento_CustomerSegmnet module, but I don't want to skip that.
Moreover I have noticed that tables like catalog_product_entity_int, catalog_product_entity_varchar are not updated by structure. There must be entity_id filed instead of row_id.

This is what I am getting

catalog_product_entity_int_wrong

This should be after migration

catalog_product_entity_right

I have used data-migration-tool 2.1.5, not sure why this not working.

Any hint for resolve this issue after migration completed.

Thanks.

@victor-v-rad
Copy link
Collaborator

Hi @popatkaran

Seems this is known issue with migrated custumer segment. Internal ticket is MAGETWO-60207.
row_id field is created by "Staging" feature of Magento 2 EE instead of entity_id

@ghost
Copy link

ghost commented Mar 27, 2017

Hi Victor, I am unable to locate MAGETWO-60207. Could you please guide me to locate it? Also please guide us to resolve this issue while migration. !!

@victor-v-rad
Copy link
Collaborator

MAGETWO-60207 is internal Jira ticket. It is in a queue to resolve

@ghost
Copy link

ghost commented Mar 28, 2017

Thanks Victor for your updates. Any tentative date to resolve this issue? So we could check after that for further updates. Thank you.

@victor-v-rad
Copy link
Collaborator

The Data Migration Tool is an opensource project which enables you to find out the cause of this issue if it is urgent for you. Also we gladly accept apt contribution from our community through Pull Request procedure.

@ghost
Copy link

ghost commented Mar 28, 2017

I am actively looking for its solution by own. I will post it if I will get success. Thanks

@victor-v-rad
Copy link
Collaborator

victor-v-rad commented Mar 30, 2017

Hi @ravibhalodia @popatkaran

I cannot reproduce the issue. Here is my configuration
customersegments

After migration store front works fine as well as editing this segment in Admin Panel of Magento 2. Please make sure you have "Staging" feature installed in your Magento 2 store

@ghost
Copy link

ghost commented Mar 30, 2017

We have around 30 rules in segmentation. Is it possible to generate this issue due to confliction in any rule?

@victor-v-rad
Copy link
Collaborator

@ravibhalodia
Do you have entity_id or row_id in your catalog_product_entity_int table of Magento 2?

@popatkaran
Copy link
Author

@victor-v-rad
Hello Victor, we have row_id in catalog_product_entity_int table of Magento 2
catalog-product-entity-int

@victor-v-rad
Copy link
Collaborator

As for now I can suggest sending me dump of the tables

enterprise_banner_customersegment
enterprise_customersegment_customer
enterprise_customersegment_event
enterprise_customersegment_segment
enterprise_customersegment_website
enterprise_targetrule_customersegment

and I will try to reproduce it again.
You can find my email in the page of my profile.

@victor-v-rad
Copy link
Collaborator

@popatkaran @ravibhalodia

Do you have Advanced Customer Segments installed in your Magento 1 store? Or any other extensions for the original Customer Segments? It could actually be a cause of the issue.

@ghost
Copy link

ghost commented Mar 31, 2017

@victor-v-rad

No there isn't any customization or additional extension installed for customer segmentation. I see it default only. However, if you would like to review M1 db - I could upload it somewhere to review.

@victor-v-rad
Copy link
Collaborator

The solution could be to empty data in migrated DB magento_customersegment_segment.condition_sql field for all records. Then resave all Customer Segments in Admin Panel.

@victor-v-rad
Copy link
Collaborator

victor-v-rad commented Apr 4, 2017

@popatkaran @ravibhalodia

The above solution probably the right one. After resaving I got different SQL query in magento_customersegment_segment.condition_sql then it had been right after migration. It indicates that Magento 2 changed forming magento_customersegment_segment.condition_sql with the same "Conditions". We will add instructions to the Migration Guide.

One more thing. You can get the error "We can't save the segment right now" while saving. It happens when you have some Product Attribute in your Conditions. It is a bug of Magento 2 and not of the tool. Its internal issue MAGETWO-66231.

@ghost
Copy link

ghost commented Apr 5, 2017

Thank you @victor-v-rad

@victor-v-rad
Copy link
Collaborator

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants