Skip to content

fix: Resolve the personal drive page from the current drive, not the user home page - EXO-90214 - #2092

Merged
AzmiTouil merged 2 commits into
developfrom
backport/EXO-90214-personal-drive-location
Sep 25, 2026
Merged

AzmiTouil merged 2 commits into
developfrom
backport/EXO-90214-personal-drive-location

Conversation

@AzmiTouil

Copy link
Copy Markdown
Contributor

Backport of EXO-90214 from feature/maintenance to develop

Mechanical backport of the two fixes validated for EXO-90214, in their original order, each with git cherry-pick -x:

Source PR Source commit (feature/maintenance) Backport commit
#2090 e2dc5702 268fbfc5
#2091 4bae48ec a8f2d967

Both commits carry the same ticket: #2090 routes the ONLYOFFICE "Go to documents" link through getEditorUrl, #2091 fixes the personal-drive branch of that helper (defaultPath is the user's home page, not the My Workspace site). Landing #2091 alone would leave the cell-level construction of #2090 missing on develop.

Verification. Both picks applied without conflict; the changed lines are identical to the source commits. Full production webpack build of documents-webapp (14 bundles) and ESLint on the changed files, no error. No POM change, no prerequisite missing on develop.

Classification: N3, inherited from the source PRs — frontend only, no REST/DAO/schema/ACL surface.

Knowledge: none — as on the source PR; the defaultPath and backTo facts are to be proposed to domains/documents.md §14 separately.

🤖 Generated with Claude Code

…onal drive - EXO-90214 (#2090)

Fixes the redirect reported in EXO-90214
Repro: open My Workspace > Drive, browse into a space via "Lecteurs d'espace", open an ONLYOFFICE document, click "Go to Document" (top right) — lands on the personal Documents treeview instead of the file's actual space location.

Root cause: DocumentsFileNameCell.openInEditMode() / openInReadOnlyMode() build the editor's backTo param as the raw window.location.pathname, duplicating (and diverging from) the drive-aware logic that $documentsUtils.getEditorUrl(file, mode) already implements correctly elsewhere in this app (DocumentsMain.vue, FileSearchCard.vue, activity attachments…). "My Workspace > Drive" browses into a space's drive as a pure client-side SPA — the URL never leaves /portal/dw/documents, even while viewing a space's files — so the raw-pathname shortcut always points back to the personal drive regardless of where the opened file actually lives.

Fix: replace the duplicated URL construction with the existing $documentsUtils.getEditorUrl(file, mode) helper, matching the pattern already used everywhere else file-open actions are wired.

Verified live against a real file (/Groups/spaces/test_space_perf_1/Documents/...) browsed from "My Workspace > Drive > Lecteurs d'espace": old code computed backTo=/portal/dw/documents (the bug, reproduced exactly); the fix computes backTo=/portal/g/:spaces:test_space_perf_1/documents (correct). Full-repo sweep confirms no other occurrence of the same raw-pathname pattern.

Classification: N3 (frontend-only, no REST/DAO/schema/ACL surface).
(cherry picked from commit e2dc570)
…user home page - EXO-90214 (#2091)

The personal branch of getParentFolderUrl, and the two sibling
constructions in DocumentInfoDrawer, built the drive URL as
eXo.env.portal.defaultPath + /dashboard/drive. defaultPath is the
user's home page (UserPortalConfigService.getUserHomePage), so a user
whose home is People was sent to /portal/dw/people/dashboard/drive/...
after "Go to documents" in the ONLYOFFICE editor.

getPersonalDriveUrl() replaces the three constructions: the current
pathname truncated at /Private when inside the personal drive, the
current pathname when the Documents application is on the page, and
the addon's own global SYSTEM node /portal/<metaPortal>/documents
otherwise, the same target DocumentPermanentLinkPlugin and
NotificationUtils use. A file at the drive root points at the drive
page itself.

No query string is added to backTo: EditorPortlet passes it through
HTMLSanitizer.sanitize, which encodes "=" as "&#61;". The folder still
opens because initSettings forces the folder view on the personal
drive before getDocumentDataFromUrl reads the path.

(cherry picked from commit 4bae48e)
@github-actions github-actions Bot added the partialCIBuild Perform Partial CI Build label Sep 25, 2026
@AzmiTouil
AzmiTouil enabled auto-merge (squash) September 25, 2026 08:54
@AzmiTouil
AzmiTouil merged commit 47dfd46 into develop Sep 25, 2026
10 of 11 checks passed
@AzmiTouil
AzmiTouil deleted the backport/EXO-90214-personal-drive-location branch September 25, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

partialCIBuild Perform Partial CI Build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants