Skip to content

Conversation

@eszkadev
Copy link
Contributor

@eszkadev eszkadev commented Nov 2, 2025

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
e700102

Fixes nextcloud/richdocuments#3815

@eszkadev eszkadev requested review from a team and skjnldsv as code owners November 2, 2025 06:33
@eszkadev eszkadev requested review from juliusknorr, nfebe and szaimen and removed request for a team November 2, 2025 06:33
@eszkadev eszkadev force-pushed the bugfix/fix-richdocuments-3815-master branch 3 times, most recently from 3a08750 to d9600e3 Compare November 2, 2025 06:40
@eszkadev eszkadev changed the title Do not fail on missing sidebar in files list fix(files): Do not fail on missing sidebar in files list Nov 2, 2025
@eszkadev eszkadev force-pushed the bugfix/fix-richdocuments-3815-master branch from d9600e3 to 058dd55 Compare November 3, 2025 04:47
@szaimen szaimen removed their request for review November 3, 2025 07:42
@szaimen szaimen added bug 3. to review Waiting for reviews labels Nov 3, 2025
@szaimen szaimen added this to the Nextcloud 33 milestone Nov 3, 2025
@juliusknorr juliusknorr force-pushed the bugfix/fix-richdocuments-3815-master branch from 058dd55 to cd6fef0 Compare November 6, 2025 10:42
@juliusknorr
Copy link
Member

/compile

@github-actions
Copy link
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@skjnldsv
Copy link
Member

/compile rebase

@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Nov 18, 2025
eszkadev and others added 2 commits November 18, 2025 13:27
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 files: Error while opening sidebar Object
log @ index.mjs:54
index.mjs:54 files: Error while opening sidebar Objectapp: "files"
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
e700102

Fixes nextcloud/richdocuments#3815

Signed-off-by: Szymon Kłos <[email protected]>
Signed-off-by: nextcloud-command <[email protected]>
@nextcloud-command nextcloud-command force-pushed the bugfix/fix-richdocuments-3815-master branch from 669c96e to d41d3d1 Compare November 18, 2025 13:30
@skjnldsv skjnldsv merged commit 0da54d3 into master Nov 18, 2025
111 of 123 checks passed
@welcome
Copy link

welcome bot commented Nov 18, 2025

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

@skjnldsv skjnldsv deleted the bugfix/fix-richdocuments-3815-master branch November 18, 2025 13:52
@skjnldsv
Copy link
Member

/backport dc3741a to stable32

@skjnldsv
Copy link
Member

/backport dc3741a to stable31

@eszkadev
Copy link
Contributor Author

thank you very much for solving conflicts :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish bug feedback-requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Files sometimes do not get opened immediately on internal links

7 participants