nextcloud/apps/files
Szymon Kłos 44b9293f72 Do not fail on missing sidebar in files list
When using richdocuments it was failing in case of shared links
or when user with opened file did a wheel click on a refresh page.
Then new tab appeared but instead opening the file it was doing
nothing (showing the list of files) or downloading the file.

Make code more defensive. I found these logs while debugging:
OCA.Files.Settings initialized
Sidebar.js:19 OCA.Files.Sidebar initialized
ShareSearch.js:16 OCA.Sharing.ShareSearch initialized
comments-app.js:15 OCA.Comments.View initialized
index.mjs:54 [ERROR] files: Error while opening sidebar Object
log @ index.mjs:54
index.mjs:54 [ERROR] files: Error while opening sidebar Objectapp: "files"error: TypeError: window.OCA.Files.Sidebar.open is not a function
    at h.exec (http://nc/dist/files-main.js?v=106d16db-0:1:70123)
    at o.openSidebarForFile (http://nc/dist/files-main.js?v=106d16db-0:1:163422)
    at o.handleOpenQueries (http://nc/dist/files-main.js?v=106d16db-0:1:163167)
    at o.openDetails (http://nc/dist/files-main.js?v=106d16db-0:1:162349)
    at fn (http://nc/dist/core-common.js?v=106d16db-0:1:3942538)
    at e.run (http://nc/dist/core-common.js?v=106d16db-0:1:3946900)
    at sa (http://nc/dist/core-common.js?v=106d16db-0:1:3948728)
    at Array.<anonymous> (http://nc/dist/core-common.js?v=106d16db-0:1:3943585)
    at bn (http://nc/dist/core-common.js?v=106d16db-0:1:3942986)level: 2uid: "admin"[[Prototype]]: Object
log @ index.mjs:54

Possibly regression from
e7001022c7

Fixes https://github.com/nextcloud/richdocuments/issues/3815

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2025-11-02 06:23:05 +00:00
..
appinfo feat(files): provide UI to sanitize filenames after enabling WCF 2025-09-02 10:53:01 +02:00
composer feat(files): provide UI to sanitize filenames after enabling WCF 2025-09-02 10:53:01 +02:00
img fix: add notification icon for transfer ownership 2024-10-16 17:31:57 +02:00
l10n fix(l10n): Update translations from Transifex 2025-11-01 00:13:35 +00:00
lib chore(i18n): Fixed grammar 2025-09-23 12:35:30 +00:00
src Do not fail on missing sidebar in files list 2025-11-02 06:23:05 +00:00
templates feat(files): provide UI to sanitize filenames after enabling WCF 2025-09-02 10:53:01 +02:00
tests chore(rector): Apply current rector config 2025-08-26 16:27:26 +02:00
.l10nignore chore: Add SPDX header 2024-05-29 08:58:16 +02:00
openapi.json chore(deps): Update nextcloud/openapi-extractor to v1.8.2 2025-08-26 10:21:10 +02:00
openapi.json.license chore: Add SPDX header 2024-05-29 08:58:16 +02:00