Closed
Description
Preconditions
- Magento 2.1.2
- PHP7
Steps to reproduce
- Go to swagger or call rest API through script
- Try updating or creating a product with a video_url, video_title etc. with media type "external-video".
- I used the following JSON:
{
"product": {
"sku": "SKU",
"media_gallery_entries": [
{
"media_type": "external-video",
"disabled": false,
"label": "",
"types": [],
"content": {
"type": "image/jpeg",
"name": "FyL6smNEMiU.jpg",
"base64_encoded_data": "encoded_image"
},
"extension_attributes": {
"video_content": {
"media_type": "external-video",
"video_url": "https://youtu.be/FyL6smNEMiU",
"video_title": "Video title",
"video_description": "Video description"
}
}
}
]
},
"saveOptions": true
}
Ofcourse I used a valid base64 encoded image as thumbnail and used a correct SKU.
Expected result
Product should be created or updated with a valid video gallery item, which should have all necessary attributes filled like video_url and video_title.
Actual result
The product is updated, however there is only a thumbnail image and no video attributes. If you will load the product through API you will get the item back with the right media_type but without attributes.
Comment
I think it has something to do with the fact that the productRepository is handling the gallery entries by itself and is not yet processing any of the extension_attributes for gallery items.