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

After Update from 2.0.2 to 2.0.4 all images are erased #4054

Closed
esiemens opened this issue Apr 7, 2016 · 11 comments
Closed

After Update from 2.0.2 to 2.0.4 all images are erased #4054

esiemens opened this issue Apr 7, 2016 · 11 comments
Labels
Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: needs update

Comments

@esiemens
Copy link

esiemens commented Apr 7, 2016

After updating magento 2.0.2 to 2.0.4 with no errors reported all images are deleted from my site.

@mazhalai
Copy link
Contributor

@esiemens thank you for reporting, we have created MAGETWO-51935 to investigate and fix.

@mazhalai mazhalai added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Apr 15, 2016
@plentyhappy
Copy link

We have this problem too. Cannot install security update 2.0.4 so we are stuck with 2.0.2 until this is fixed :(

May be related to this:

https://community.magento.com/t5/Installing-Magento-2/Magento-2-installation-incomplete/m-p/33260#M1145

#2437

@mazhalai
Copy link
Contributor

@esiemens @plentyhappy Please check file permissions on pub folders, since upgrade is performed via composer, permissions are not preserved. Also, did you try to deploy your static content after upgrade? bin/magento setup:static-content:deploy

@plentyhappy
Copy link

Thanks for the response.

My hosting provider told me there are no permission issues. The deployment of static resources did not help. They think the issue stems from the fact that sample data was used for this store originally.

They also said this, "I'm guessing it's a bug in Magento, as we have upgraded a number of stores that did not have sample data initially, and all of those were fine. It's likely the sample data being used initially that is triggering a bug where images are removed"

@ark99
Copy link
Contributor

ark99 commented Apr 19, 2016

@plentyhappy, we have tried two times without success to recreate your issue.

  1. Can you please share your steps to initially install the store and sample data. And then later to do upgrade.
  2. Were you starting out with 2.0.2 initially or you had some prior version (2.0.1 or 2.0.0) installed initially that you had upgraded to 2.0.2?

Thanks!

@robfico
Copy link
Contributor

robfico commented Apr 19, 2016

For this store, it was initially installed as a 2.0.0 store with sample data with root web directory of pub. Upgrades are done via editing composer.json file, adjusting version, and then running "composer update". Mode of store is "default". Upon upgrading from 2.0.2 to 2.0.4, all non-sample product images are deleted from pub/media/catalog/product. No permission issues, as set up is per Magento recommended method.

In watching the upgrade procedure, the images get deleted at this exact point in the update:
[Removing magento/sample-data-media (100.0.3)]

Up until that point, they are present in the directory.

@frangopr
Copy link

frangopr commented May 15, 2016

I had this same issue. Definitely back up your images someplace before upgrading.

In my case, I installed 2.0.2 with sample data. Deleted sample data and added new items, images and other settings via admin. Upgrade to 2.0.5 made images dissapear n the front end (showing standard Magento placeholder image).

Upon inspection:

  1. Back end showed image in "Basic Settings > Image and Videos" but NOT in the backend Catalog Product Grid.
  2. Image URL in backend "Basic Settings > Image and Videos" seemed correct (pub/media/catalog/product/1/...) But front end did not fetch.
  3. Exporting product list indeed gave me the correct image paths from the old install. (Images were still accesible by accesing direct path, I am not sure if they were in cache or local honestly)
  4. Suddenly found out that local images were deleted completely by Magento. (Ie. before on 2.0.2 there were folders created on ub/media/catalog/product/ that now disappeared.)

@tkacheva
Copy link

@benchmarky Thanks for reporting the issue! We will take care about in and include the fix in further magento patches

Internal issue MAGETWO-53232

@KrystynaKabannyk
Copy link

Hello @esiemens, this issue has been fixed in the 2.1.0 Release, that's why I'm closing it. If you any questions or additional information regarding the issue feel free to reopen it or create a new one.

@tomasinchoo
Copy link

It started to happen to me on 2.1.1. out of the blue sky!

@rob-gonz
Copy link

2.1.5 -> 2.16 pub/media/wysiwyg is now gone. I have successfully upgraded ever version using my workflow from 2.1.1 to 2.1.5. I did nothing different this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: needs update
Projects
None yet
Development

No branches or pull requests