craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.21k stars 624 forks source link

[4.x]: Photos are not restored after the revision is restored #13626

Closed iZerus closed 11 months ago

iZerus commented 1 year ago

What happened?

Description

I created a record, added photos to it. Then I deleted the photos. But when I decided to restore the previous version (where there were photos), the photos never recovered. P.S. When deleting photos, photos remain in assets

Steps to reproduce

  1. Create a section with the Assets field (with versioning control)
  2. Create an entry in this section and attach photos to it
  3. Save it
  4. Delete photos from entry and save
  5. Try to restore the version with photos

Expected behavior

Photos must be present in the entry

Actual behavior

Photos are missing

Craft CMS version

4.5.3

PHP version

8.1

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

i-just commented 1 year ago

Hi, thanks for reporting! I raised a PR to adjust this.

brandonkelly commented 11 months ago

Craft 4.5.4 is out with that fix. Thanks again!

olivierbon commented 11 months ago

There might be a part two to this. It also happens with Matrix Blocks.

https://github.com/craftcms/cms/assets/146041/079987fb-49eb-4def-8244-0a26b2b30f32

brandonkelly commented 11 months ago

Thanks @olivierbon! Fixed for the next release via #13740.

brandonkelly commented 11 months ago

Craft 4.5.6 is out now with that fix.