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

Update links when cloning regions

Open svenseeberg opened this issue 2 years ago • 1 comments

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.

svenseeberg avatar May 03 '22 12:05 svenseeberg

This either depends on #1414 or the media links have to be excluded from the replacement, otherwise the images will be broken.

timobrembeck avatar May 17 '22 13:05 timobrembeck

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.

timobrembeck avatar Mar 16 '23 13:03 timobrembeck