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

Linked YouTube Videos created in the Magento backend disappear after running Magmi update #83

Open
hazzy opened this issue Aug 11, 2020 · 1 comment

Comments

@hazzy
Copy link

hazzy commented Aug 11, 2020

Magento ver. 2.3.5-p1

Hi all, problem is i have created some Youtube linked videos in the Magento backend and they disappear after the Magmi update run.

When a new video is added a new thumbnail image is created in "catalog_product_entity_media_gallery" (example called /h/q/hqdefault_173_10.jpg) After the magmi run to update images, that thumbnail is removed and the RI constraint means the associated row in catalog_product_entity_media_gallery_value_video is also cascade deleted.

My theory is because the thumbnail is not in the "media_gallery" field in the feed, Magmi removes it?

Anyone help please? Thanks, Hazzy

Tables of interest
catalog_product_entity_media_gallery
catalog_product_entity_media_gallery_value_to_entity
catalog_product_entity_media_gallery_value

and
catalog_product_entity_media_gallery_value_video
which has these RI Foreign Keys
CAT_PRD_ENTT_MDA_GLR_VAL_VIDEO_STORE_ID_STORE_STORE_ID
Fields: store_id
Referenced Scheme: magento2_live
Referenced Table: store
Referenced Fields: store_id
On Delete: CASCADE
On Update: RESTRICT

FK_6FDF205946906B0E653E60AA769899F8
Fields: value_id
Referenced Scheme: magento2_live
Referenced Table: catalog_product_entity_media_gallery
Referenced Fields: value_id
On Delete: CASCADE
On Update: RESTRICT

@robert-chefsdeal
Copy link

add a column named media_gallery_reset to your csv file and place 0 in that column for all rows.
You can check magmi\plugins\extra\itemprocessors\imageprocessor\imageitattributeemprocessor.php line 606-615 for the reason.
Hope it helps.

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

No branches or pull requests

2 participants