integreat-cms
integreat-cms copied to clipboard
Update links when cloning regions
Motivation
When a region is cloned, all links in the content still point to pages in the old region. However, in almost all cases these links should point to pages in the newly created region. We're already planing to have a centralized search & replace function. This function can be used to update all pages when cloning a region. This prevents any human errors that could occur when manually replacing the URLs.
Proposed Solution
Call the search & replace function created in #1382 to replace the base URL + region slug for all pages (including all versions if easily possible) without adding new page versions. A minor edit should be okay.
This either depends on #1414 or the media links have to be excluded from the replacement, otherwise the images will be broken.
This either depends on #1414 or the media links have to be excluded from the replacement, otherwise the images will be broken.
My earlier statement is not true since media links use the region id and not the region slug in links. So replacing the region slug should be fine.