Skip to content

Unable to upload Visual Swatch image on Magento 2.1.7 #10379

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

Closed
ebubekirkaragol opened this issue Jul 30, 2017 · 4 comments
Closed

Unable to upload Visual Swatch image on Magento 2.1.7 #10379

ebubekirkaragol opened this issue Jul 30, 2017 · 4 comments
Labels
Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@ebubekirkaragol
Copy link

Preconditions

  1. Magento 2.1.7
  2. PHP 7.0.18-0ubuntu0.16.04.1

Steps to reproduce

  1. Create a visual swatch attribute
  2. Select Visual Swatch from drop down menu for 'Catalog Input Type for Store Owner' option
  3. Click add swatch button
  4. Select Upload File from Swatch drop down menu
  5. Select file to upload.

Expected result

  1. Uploaded file is shown in Manage Swatch section

Actual result

  1. File uploaded to "root_directory/pub/media/catalog/product/a/l/al-image.jpg" path.
  2. But image doesn't shown in Manage Swatch section.
  3. It's uploaded on server but not working with that attribute.
@lexwet
Copy link

lexwet commented Jul 30, 2017

Maybe you have a similar problem as here #9849

Try to disable EAV cache. Flush the cache.
Can you see the image in Manage Swatch section?

@ebubekirkaragol
Copy link
Author

I tried it, but didn't work.

I also tried to disable all cache types. Then flushed tha cache. But still i can not see any image in Manage Swatch section.

@magento-engcom-team magento-engcom-team added G1 Passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed G1 Passed labels Sep 5, 2017
@magento-engcom-team magento-engcom-team added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch labels Sep 28, 2017
@magento-engcom-team
Copy link
Contributor

@ebubekirkaragol, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.
We tested the issue on 2.3.0, 2.2.0, 2.1.9

@lammanh0405
Copy link

lammanh0405 commented Jan 4, 2018

In file vendor/magento/module-swatches/view/adminhtml/web/js/visual.js
Change this code "var imageParams = $.parseJSON($(this).contents().find('body').html())"
to "var imageParams = $.parseJSON(this.contentWindow.document.body.innerHTML)"

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

4 participants