integreat-cms
integreat-cms copied to clipboard
Copy used media library items when cloning region
Describe the Bug
When regions are cloned, the media library is not cloned as well
Steps to Reproduce
- Create region
- Select other region to clone contents from
- Go into new region
Expected Behavior
The media library should be cloned as well
Actual Behavior
The media library is not cloned
Additional Information
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.
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).
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.
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.
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
@svenseeberg Is there still an open question or could the question label be removed? :slightly_smiling_face: