OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.43k stars 2.4k forks source link

Clone: Attached Image not found after publishing the cloned version #7319

Open hung-doan opened 4 years ago

hung-doan commented 4 years ago

Problem

Say we cloned an original item into a cloned item.

Actual: Image in the original item is not found after publishing the cloned version Expect: Image should be cloned and displayed correctly. Both images in the original item and the cloned item should be displayed correctly.

About OC

Steps

Step 1: Create a Content Type with a "Media" field.

Step 2: Set media field as Attached image

Step 3: Create a new content item image

Step 4: Clone the content item The new item would be the draft version.

Step 5: Publish the cloned draft version.

At this point.

My expectation: Both images in the original item and the cloned item should be displayed correctly.

sebastienros commented 4 years ago

Attached media fields have a content item reference. That explain the issue, and it requires a custom handler for the clone event.

Skrypt commented 4 years ago

The file need to be duplicated in the proper folder.