Automatically convert Links with "external" URLs to same site to page links in RTE transformation or link wizard?
I think it is a common phenomenon, that editors copy URLs out of the site and use it for the links. This may be especially true for large sites where it is tedious to click through the page tree in the link wizard.
The downside is:
- these links will break if the URL changes. Even if there are redirects, it is not necessary to redirect in this case and it does have an unnecessary performance and load impact.
- these URLs are more permanent. The page id will not change, the URL may change.
- will not work for translated pages, e.g. when the content is translated you have to change the links. If these were page links they would automatically already point to the translated page
There is already an extension which does these conversions but it currently does not work for RTE: https://github.com/georgringer/uri2link/
Also, I am wondering, why do this at a later point? Why not do it when the link is created:
- e.g. in the Link wizard. Either automatically convert the external URL link to page link in the link wizard or via a button. Make this configurable if this should always be done, be done in control of the editor or not at all.
- or, on RTE -> DB transformation
The conversion should work for RTE field and non-RTE fields.
In any case it would be good to additionally have a wizard or command line tool which does the conversion for old content.
Updated by Georg Ringer about 1 year ago
- Status changed from New to Accepted
- Target version set to Candidate for Major Version
Just some additional notes:
Editors often use this ways because:
- They lack permissions to access certain parts of the website
- It is not possible to link to records, e.g. news records
- The don't find the page in the tree
The linked extension does the remapping at this point because there is no earlier way to hook into.
Some things which need to covered with new solution:
- linking to records
- info to editor that link changed
- improved handling of parameters, including L=