Magento2: Magento 2.3.3 - Images lost when re-saving a category

Created on 22 Oct 2019  路  33Comments  路  Source: magento/magento2

Preconditions (*)

  1. Magento 2.3.3

Steps to reproduce (*)

  1. Edit category
  2. No images are loaded
  3. Save category -> images are lost
  4. Edit category - upload images -> save, images are saved
  5. Edit category -> images are not loaded

Expected result (*)

  1. Images to exist

Actual result (*)

  1. No images in back end or front end
Admin Catalog Image ready for confirmation duplicate

All 33 comments

Hi @craigcarnell. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • [ ] Summary of the issue
  • [ ] Information on your environment
  • [ ] Steps to reproduce
  • [ ] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@craigcarnell do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • [ ] yes
  • [ ] no

Hi @ajijshekh123. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [x] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [x] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [x] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 5. Add label Issue: Confirmed once verification is complete.

  • [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.

Give me @magento give me 2.3-develop instance

Hi @ajijshekh123. Thank you for your request. I'm working on Magento 2.3-develop instance for you

Hi @ajijshekh123, here is your Magento instance.
Admin access: https://i-25209-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

I have just ran into this exact issue on a 2.3.3 instance.

This issue is related to the: https://github.com/magento/magento2/issues/22222

I think this issue is related to the DB as per the above issue comment.
I don't have this issue reproduced. Please see attached screenshot:

2019-10-22 (4)

2019-10-22 (5)

@craigcarnell - Now I am closing this issue. If you have reproduced this issue again. you can reopen it.

@ajijshekh123 So whats the solution?? I can't find anything in that linked issue suggesting a solution. There is an issue here, perhaps when migrating from 2.2 to 2.3. This is happening for me on 3 Magento installs, all of which have been upgraded from 2.2

I think you haven't proper migrating DB that's why this issue found in your magento instance.
Magento fresh 2.3.3 instance I can't reproduce this issue that's why I have close it.

Just to explain what I am seeing happening here:

  1. Create a new category
  2. Upload an image, e.g. my-image.png
  3. Save the category
  4. Checking the media/catalog/category folder I can see my-image.png and checking the database table catalog_category_entity_varchar I can see my-image.png for attribute ID 48 (image)
  5. Reload category and click save
  6. Image now missing, checking media folder and its still there BUT checking the database and the entry is now showing my-image_1.png - but that image path obviously doesn't exist.

Magento Provide me Magento 2.3.3 instance and I have verified this issue with your same steps but I can't find it.
If you have querey this issue is related to Default Magento instance you can open it.

Thanks.

So you've closed this issue because you can't reproduce it on a fresh installation of Magento, but did you try to reproduce the issue on an upgraded instance? I followed the exact upgrade steps listed here and this issue has now occured on 3 instances of Magento.

Okay Fine @paul-blundell, Now I have reopen this issue.

Thanks for the update.

I have also just done a completely fresh install, new files and database following these instructions: https://devdocs.magento.com/guides/v2.3/install-gde/composer.html

Same issue.

Thanks for reopening.

Hi @krishprakash. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [x] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 5. Add label Issue: Confirmed once verification is complete.

  • [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.

Hi @craigcarnell. Thank you for your report.
Seems similar issue is already open
Please check #25099
And it's only reproduce on 2.3.3 not in 2.3-develop instance
Thanks

I reproduce this issue now on EE 2.3.3

PRECONDITION:

  1. Clean install Magento 2.3.3
  2. One Category Created.

STEPS TO REPRODUCE:

  1. Go to category that was created in precondition
    2 Open tab "Content" and upload "Category Image" (For example: name of file elephant.jpg)
  2. Save Category. (Category saved and opened again)
  3. Check "Content" tab that image you uploaded is displayed in Category Image attribute.
  4. Check "catalog_category_entity_varchar" table. Find name of your file "elephant.jpg" in list of rows (by default in clean install category image attribute has id - 48)
  5. Do nothing and save the category again.
  6. Check "Content" tab again that image you uploaded earlier is still in Category Image attribute (Actual result is that picture has disappeared)
  7. Check "catalog_category_entity_varchar" table. Find name of your file uploaded earlier "elephant.jpg" in list of rows. Note that name has changed from "elephant.jpg" to "elephant_1.jpg"

ACTUAL RESULT:
The already uploaded category image Disappears when the category is saved again.

EXPECTED RESULT:
The already uploaded category image should not disappear when the category saving again.

I am having the same issue on EE 2.3.3 -- was upgraded from previous versions.

I just ran into this issue on a fresh install of 2.3.3 community. It is definitely still an issue.

Still occurring on fresh install of 2.3.4 too :-(

I have the same issue on a EE B2B 2.3.3.

I have the same issue on an EE 2.3.3 too.

Hi @krishprakash. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 5. Add label Issue: Confirmed once verification is complete.

  • [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.

@magento give me 2.4-develop instance

Hi @krishprakash. Thank you for your request. I'm working on Magento 2.4-develop instance for you

Hi @krishprakash, here is your Magento instance.
Admin access: https://i-25209-2-4-develop.instances.magento-community.engineering/admin_5d29
Login: 457a7e0b Password: 1c16d9ace50a
Instance will be terminated in up to 3 hours.

Hi APanteleychuk, Issue is fixed on 2.3.4
Need to move this issue to EE repository.
@sdzhepa kindly move this issue to EE/B2B repository as mentioned in last 2 feedback.
Thanks

Hi APanteleychuk, Issue is fixed on 2.3.4
Need to move this issue to EE repository.
@sdzhepa kindly move this issue to EE/B2B repository as mentioned in last 2 feedback.
Thanks

This issue is definitely not fixed on 2.3.4, it happens to one of our customers all the time.

Still happens in 2.4.0:

  • Open some category
  • Upload image and save the category - image attribute value appears in catalog_category_entity_varchar table with the path: /pub/media/catalog/category/gear.jpg
  • Save the category - path is changed to /magento/htdocs/pub/media/catalog/category/gear.jpg
  • Save the category again - attribute value is removed from catalog_category_entity_varchar table

Can confirm that this still happens with 2.4.

Hi,
Has anybody found a solution ? Because recently i have faced the same issue in EE 2.3 with custom category image attribute . When I re-saving the category, the custom image getting lost and also the name of image updated to myimage_1.jpg as in mentioned table.

Hi, We have recently upgraded to Magento 2.3.5 and we are noticing a similar issue.

I am still with 2.3.3 is there any solution?

Was this page helpful?
0 / 5 - 0 ratings