integreat-cms icon indicating copy to clipboard operation
integreat-cms copied to clipboard

Copy used media library items when cloning region

Open timobrembeck opened this issue 2 years ago • 6 comments

Describe the Bug

When regions are cloned, the media library is not cloned as well

Steps to Reproduce

  1. Create region
  2. Select other region to clone contents from
  3. Go into new region

Expected Behavior

The media library should be cloned as well

Actual Behavior

The media library is not cloned

Additional Information

timobrembeck avatar May 11 '22 07:05 timobrembeck

This behavior is currently intended. The links to images are not replaced in pages, therefore all pages are linking to images in the source region. Therefore there is no technical requirement for copying the media library.

We already have another feature planned to replace links in all pages #1382. This could make cloning media items more interesting. IMHO we can make this a post release feature request.

svenseeberg avatar May 11 '22 09:05 svenseeberg

To sum up discussions in chat: it would be nice to copy files that are being used (included in pages or events) and update image source attributes accordingly (#1382 & #1383).

svenseeberg avatar May 11 '22 09:05 svenseeberg

mhh i want to add more prio to that. I have cloned siegen-wittgenstein now and no icons were replicated. To ensure that they are able to choose from all yellow icons i will add them all to their media library manually.

dkehne avatar Jul 12 '22 10:07 dkehne

mhh i want to add more prio to that. I have cloned siegen-wittgenstein now and no icons were replicated. To ensure that they are able to choose from all yellow icons i will add them all to their media library manually.

This problem has been solved by using the central media library.

svenseeberg avatar Jul 12 '22 11:07 svenseeberg

To sum up discussions in chat: it would be nice to copy files that are being used (included in pages or events) and update image source attributes accordingly (#1382 & #1383).

#2048 contains a block that can easily be inverted to get all used media files: https://github.com/digitalfabrik/integreat-cms/blob/d5237e2ee91fa84bd574aaf02798d19ac3b0d6be/integreat_cms/cms/models/media/media_file.py#L127-L146

timobrembeck avatar Mar 16 '23 13:03 timobrembeck

@svenseeberg Is there still an open question or could the question label be removed? :slightly_smiling_face:

JoeyStk avatar May 27 '24 11:05 JoeyStk