Skip to content

V16: Document shows blank page when clicking an active link #19553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class UmbContentWorkspaceViewEditElement extends UmbLitElement implements

if (this._hasRootGroups) {
routes.push({
path: `root`,
path: 'root',
component: () => import('./content-editor-tab.element.js'),
setup: (component) => {
(component as UmbContentWorkspaceViewEditTabElement).containerId = null;
Expand All @@ -108,17 +108,17 @@ export class UmbContentWorkspaceViewEditElement extends UmbLitElement implements

if (routes.length !== 0) {
routes.push({
...routes[0],
unique: routes[0].path,
path: '',
pathMatch: 'full',
redirectTo: routes[0].path,
});

routes.push({
path: `**`,
component: async () => (await import('@umbraco-cms/backoffice/router')).UmbRouteNotFoundElement,
});
}

routes.push({
path: `**`,
component: async () => (await import('@umbraco-cms/backoffice/router')).UmbRouteNotFoundElement,
});

this._routes = routes;
}

Expand All @@ -132,18 +132,20 @@ export class UmbContentWorkspaceViewEditElement extends UmbLitElement implements
? html`
<uui-tab
.label=${this.localize.term('general_generic')}
.active=${this._routerPath + '/root' === this._activePath}
.active=${this._routerPath + '/root' === this._activePath ||
this._routerPath + '/' === this._activePath}
.href=${this._routerPath + '/root'}></uui-tab>
`
: ''}
${repeat(
this._tabs,
(tab) => tab.name,
(tab) => {
(tab, index) => {
const path = this._routerPath + '/tab/' + encodeFolderName(tab.name || '');
return html`<uui-tab
.label=${this.localize.string(tab.name ?? '#general_unnamed')}
.active=${path === this._activePath}
.active=${path === this._activePath ||
(!this._hasRootGroups && index === 0 && this._routerPath + '/' === this._activePath)}
.href=${path}></uui-tab>`;
},
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,15 @@ export class UmbWorkspaceEditorElement extends UmbLitElement {

// Duplicate first workspace and use it for the empty path scenario. [NL]
newRoutes.push({ ...newRoutes[0], unique: newRoutes[0].path, path: '' });

newRoutes.push({
path: `**`,
component: async () => (await import('@umbraco-cms/backoffice/router')).UmbRouteNotFoundElement,
});
}

// Add a catch-all route for not found
// This will be the last route, so it will only match if no other routes match or if no workspace views are defined.
newRoutes.push({
path: `**`,
component: async () => (await import('@umbraco-cms/backoffice/router')).UmbRouteNotFoundElement,
});

this._routes = newRoutes;
}

Expand Down
Loading