Issue 3592317 / Walkthrough

Validate path aliases when saving Canvas pages

Canvas validates aliases on editor publication and HTTP API saves, including saves requested by the CLI. Before, a slash-only alias such as / was saved as an alias without an alias, and duplicate aliases or aliases without a leading slash were saved as-is when they did not come through the editor's alias field.

1 · Editor · 34 seconds

Set and change a URL alias

/demo-team/ is published as /demo-team, then changed to /demo-our-team. Core's URL alias list shows a single alias, updated in place.

2 · Editor · 38 seconds

Reject a slash-only alias, then clear the alias

Publishing / is blocked, and the existing alias is kept. Clearing the alias field still publishes and removes the alias.

3 · Canvas CLI · 44 seconds

Push pages with URL aliases

A page is created with its alias and updated with the alias unchanged. The site rejects / and a duplicate alias. The last push is refused by the CLI itself, which already did not allow alias changes for existing pages; this change does not touch that guard.

What is validated

Errors point at path.0.alias.

Alias Result Video
/demo-team/ Saved as /demo-team 1
Changed alias Existing alias updated in place 1
Unchanged alias, other changes Saved 3
Empty Alias removed 2
/, ///, / surrounded by spaces Rejected: This value should not be null. The existing alias is kept. 2, 3
Used by another page Rejected: The alias … is already in use in this language. 3
No leading slash Rejected: The alias path has to start with a slash. —
Existing duplicate or malformed nonempty alias Rejected until corrected —

Unchanged Canvas CLI behavior: it refuses alias changes for existing pages. Because /demo-team/ is stored as /demo-team, a page spec with a trailing slash is refused on its next push, too.