Skip to content

Wiki aliases#3165

Merged
labkey-adam merged 9 commits intodevelopfrom
fb_wiki_aliases
Mar 30, 2022
Merged

Wiki aliases#3165
labkey-adam merged 9 commits intodevelopfrom
fb_wiki_aliases

Conversation

@labkey-adam
Copy link
Copy Markdown
Contributor

@labkey-adam labkey-adam commented Mar 23, 2022

Rationale

Our documentation pages have some very outdated names (cpasxml, sampleSets, workflowModules), but updating them is problematic because renaming a page would break all links that have been sent to clients via email, tickets, etc. Our documentation team has requested a new feature, wiki aliases, to allow them to rename wikis while still resolving page requests to the old name. These are patterned after container aliases. The basic spec plus doc team requests:

  1. Add the option (on by default) to create a wiki alias having the old name at the time a wiki is renamed

  2. Aliases are respected in only one place: if wiki-page.view is invoked with a "name" that doesn't match an existing wiki we'll then consult the list of aliases in that specific container only. If "name" is a valid alias then LabKey will redirect to the same URL, replacing "name" with the real name of the aliased wiki, and maintaining/forwarding any #anchors included with the alias name to the real page name (i.e. oldname#section would go to newname#section). Every other action (e.g., edit, delete, manage, copy, print, etc.) would require real names.

  3. As a result of 2, if a wiki is later added with an existing alias name, that wiki would take precedence over the aliased one. (This matches the container alias behavior.)

  4. Constraints will ensure that you can't add the same alias twice in the same container, but different containers can have different alias lists. (e.g., portals/lksm docs and main docs won't collide or cross-link to each other.)

  5. The manage wiki page shows a list of all aliases associated with that wiki. The alias list can be edited here.

The back-links action will stay focused on real names (ignore aliases) so the docs pages would continue to use canonical names.

Possible future enhancements: managing via an "all aliases in this folder" view could be useful for release-time-link-checking and periodic cleanups, index aliases for full-text search (not sure that's really desired).

https://www.labkey.org/home/Developer/issues/issues-details.view?issueId=45063

Copy link
Copy Markdown
Contributor

@labkey-jeckels labkey-jeckels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know you're didn't tag anyone for review yet but I was interested so I took a quick peek.

…d -> PageRowId for clarity. Remove crufty, unused, and unnecessary code.
…tent with PG. Introduce PermanentRedirectException and use it. Futz with aliases saving: be more tolerant of duplicates (just warn). Remove unused rename handling on edit page.
Copy link
Copy Markdown
Contributor

@RosalineP RosalineP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants