cancel
Showing results for 
Search instead for 
Did you mean: 

Add Video button is not clickable on Magento 2.2.4

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Add Video button is not clickable on Magento 2.2.4

Hi,

I am trying to add video into my store via admin product edit page. I have already added a youtube api key but when i click on Add Video button than nothing happens.


Image 2018-06-10 at 12.06.21 PM.png

When i check the error log than its showing

main.CRITICAL: The element 'gallery' already has a child with alias 'content' {"exception":"[object] (Magento\\Framework\\Exception\\LocalizedException(code: 0): The element 'gallery' already has a child with alias 'content' at /var/www/vhosts/demo/vendor/magento/framework/Data/Structure.php:611)"} []

Thanks for your answer in advance.

Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.
5 REPLIES 5

Re: Add Video button is not clickable on Magento 2.2.4

Hi @Sanjay Jethva,

 

Maybe you're getting a problem with the static assets. Can you try to regenerate the staic content using the console?

 

php bin/magento setup:static-content:deploy

I assume you're running on production mode.

Re: Add Video button is not clickable on Magento 2.2.4

Hello @Damian Culotta,

Thanks for your reply.

Yes, My website is in production mode and i have put it in developer mode but still the same issue.

 

Thanks

Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

Re: Add Video button is not clickable on Magento 2.2.4

Hi @Sanjay Jethva,

 

Did you find some javascritp error on your browser's console?

Re: Add Video button is not clickable on Magento 2.2.4

I am having the same problem. Did you find a solutions. (Same issue in 2.2.5 as well)

 

No Javascript errors. Have done setup:upgrade, setup:di:compile, have gone back to developer mode, etc. Nothing seems to work. Any help is appreciated.

 

UPDATE 2018-08-03 : I figured out the issue I was having. It seems as though a file was not deleted during the update process.  I my instance I got two files when running :

 

grep -rnw . -e 'as="content"' --exclude-dir var

game me :

./vendor/magento/module-product-video/view/adminhtml/layout/catalog_product_form.xml:21:            <block class="Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Gallery\Content" as="content">

./vendor/magento/module-product-video/view/adminhtml/ui_component/product_form.xml:34:            <block class="Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Gallery\Content" as="content">

 

 

 

 ls -al ./vendor/magento/module-product-video/view/adminhtml/layout/

 

 

-rw-r--r-- 1 aaa aaa 1680 Sep 13  2017 catalog_product_form.xml

-rw-r--r-- 1 aaa aaa  390 Jun 25 09:44 catalog_product_new.xml

 

I ran : 

 

mv ./vendor/magento/module-product-video/view/adminhtml/layout/catalog_product_form.xml ~/.

 

and it works fine now. I checked a new download of 2.2.5, and it did not contain this file. I hope this helps someone else.

 

 

 

Re: Add Video button is not clickable on Magento 2.2.4

Thank you @sahava! I still had this problem in v2.3.3, but after renaming /vendor/magento/module-product-video/view/adminhtml/layout/catalog_product_form.xml and flushing cache the Add Video button works again. Very helpful thank you!