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.
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.
/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.
Publishing / is blocked, and the existing alias is kept.
Clearing the alias field still publishes and removes the alias.
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.
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.