Skip to content

fix(controlled-documents): do not resolve navigator specials as documents - #11117

Open
MichaelUray wants to merge 1 commit into
hcengineering:developfrom
MichaelUray:fix/controlled-doc-new-category
Open

MichaelUray wants to merge 1 commit into
hcengineering:developfrom
MichaelUray:fix/controlled-doc-new-category

Conversation

@MichaelUray

Copy link
Copy Markdown
Contributor

Refs #10772

Problem and change

The documents location resolver treated every third path segment as a
document short link. Navigator specials such as 'categories' or 'library'
use the same segment, so whenever the resolver ran for them (e.g. on page
reload or when switching to the documents app) it looked up a document
with that id, logged 'Could not find document categories.' and set the
access denied flag.

Skip the known navigator special ids in resolveLocation so they are left
to the workbench special views.

Tests

New unit test plugins/controlled-documents-resources/src/__tests__/navigation.test.ts (all navigator specials are not looked up as documents, a normal document link still is); test scripts added to the package so CI runs it.

Notes

This addresses the "Could not find document categories" error from the report. The "New category" action itself only opens a dialog and does not navigate; the reported crash may also be related to the installation (the report shows failed model transactions and a disabled documents server plugin), hence "Refs" rather than "Fixes".

…ents

The documents location resolver treated every third path segment as a
document short link. Navigator specials such as 'categories' or 'library'
use the same segment, so whenever the resolver ran for them (e.g. on page
reload or when switching to the documents app) it looked up a document
with that id, logged 'Could not find document categories.' and set the
access denied flag.

Skip the known navigator special ids in resolveLocation so they are left
to the workbench special views.

Refs hcengineering#10772

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

1 participant