Skip to content

fix: strip .html extension when redirecting /edit to /canvas - #1299

Merged
mhaack merged 1 commit into
mainfrom
togfix
Sep 7, 2026
Merged

fix: strip .html extension when redirecting /edit to /canvas#1299
mhaack merged 1 commit into
mainfrom
togfix

Conversation

@mhaack

@mhaack mhaack commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • blocks/edit/edit.js redirects /edit to /canvas when Experience Workspace is enabled (introduced in fix: redirect /edit to /canvas when Experience Workspace is enabled #1290), but used details.fullpath as-is, which still carries the .html suffix added by getPathDetails.
  • Strips the .html suffix before building the /canvas#... hash, matching the extensionless-path convention used elsewhere (e.g. getEditPath in blocks/browse/shared.js, and the same regex already used a few lines below in this file).

Test plan

  • Enable the Experience Workspace flag, open /edit#/org/site/page, confirm redirect lands on /canvas#/org/site/page (no .html in the hash)

details.fullpath still carries the .html suffix added by
getPathDetails, but /canvas expects the extensionless path used
elsewhere (e.g. getEditPath in blocks/browse/shared.js).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@aem-code-sync

aem-code-sync Bot commented Sep 4, 2026

Copy link
Copy Markdown

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-sync branch
Commits

@mhaack
mhaack merged commit f8062df into main Sep 7, 2026
4 of 7 checks passed
@mhaack
mhaack deleted the togfix branch September 7, 2026 09:25
mhaack added a commit that referenced this pull request Sep 7, 2026
* test(e2e): add Experience Workspace user toggle coverage

Covers the /edit <-> /canvas redirect behavior (#1289,
#1290, #1299): first-time toggle-on shows the welcome dialog and sets
the nx2:ew-user-enabled flag, /edit keeps redirecting to /canvas while
the flag is set, and toggling off in the profile menu clears the flag
and stops the redirect.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* fix: remove ew check as it - testing

* fix: re-add

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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.

3 participants