Skip to content

fix: #5255 prevent shortcode conflict with reserved system routes - #5443

Draft
StephDriver wants to merge 10 commits into
masterfrom
b-5255_journal_code_conflict
Draft

fix: #5255 prevent shortcode conflict with reserved system routes#5443
StephDriver wants to merge 10 commits into
masterfrom
b-5255_journal_code_conflict

Conversation

@StephDriver

Copy link
Copy Markdown
Member

closes #5255

@StephDriver StephDriver changed the title fix: #5255 make repository short code unique fix: #5255 prevent shortcode conflict with reserved system routes Aug 17, 2026
@StephDriver

Copy link
Copy Markdown
Member Author

Notes:

  1. this doesn't only apply to journals, but to repos.
  2. on creation journal and repo codes need to be cross checked as if two have the same name it would also cause a conflict
  3. other than these codes, the reserved routes would be part of the codebase and so can be a static list with a unittest to prevent drift, rather than needing to be dynamically built each time they are needed for validation.
  4. Baking in accessibility alongside this - WCAG 3.3.1, 3.3.3, 3.3.6 around errors.

@StephDriver StephDriver self-assigned this Aug 17, 2026
@StephDriver

StephDriver commented Aug 17, 2026

Copy link
Copy Markdown
Member Author

The first commit here sets the respository shortcode to be unique. I have included a safeguard to warn if non-unique values are found on migration. Ordinarily this would be a breaking change, however in this particular case I cannot see how duplicate values could have gone unnoticed. They would have caused problems accessing the different repos. So all this is doing is bringing the repository shortcode into line with teh journal shortcode which already has 'is_unique.

This makes the validation against reserved routes simpler.

@ajrbyers are you happy with this approach?

@StephDriver
StephDriver force-pushed the b-5255_journal_code_conflict branch from a6c2dac to 2df6784 Compare August 20, 2026 16:54
@StephDriver

StephDriver commented Aug 20, 2026

Copy link
Copy Markdown
Member Author

pausing this work as 1.9 testing is more urgent. This is in a state that someone else could probably pick it up if need be. I think the solution is mostly there, but it needs full testing.

work to do:

  • review failing tests. Some are also failing on master.
  • manually test

@StephDriver
StephDriver force-pushed the b-5255_journal_code_conflict branch from 2df6784 to f661fc9 Compare August 20, 2026 17:06
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.

Journal codes can conflict with reserved system routes

1 participant