Skip to content

fix(files): do not open file by id on load for folders - #43174

Merged
skjnldsv merged 2 commits into
masterfrom
fix/files--do-not-open-folder-file-from-fileid-on-load
Feb 2, 2024
Merged

fix(files): do not open file by id on load for folders#43174
skjnldsv merged 2 commits into
masterfrom
fix/files--do-not-open-folder-file-from-fileid-on-load

Conversation

@ShGKme

Copy link
Copy Markdown
Contributor
  • Resolves
  1. Open an empty folder
  2. Go back via "Go back" button
  3. Reload the page
  4. Infinity loading and a dead tab 😵

Happens for any URL opening with fileid for a subfolder.

Summary

  • When a page is opened with a fileid, the default file action is executed
  • For example, opening an image file in the Image Viewer
  • But this also happens for folders => folder is open

Then the following is happening

  1. Open /apps/files/files/1228?dir=/parent-folder-of-1228
  2. /parent-folder-of-1228 is loaded
  3. There is a 1228 file
  4. Execute the default file action
  5. Open a folder
  6. Redirect to /apps/files/files/1228?dir=/parent-folder-of-1228/folder-1228
  7. File 1228 is not present in this folder => redirect to the correct directory with the file 1228
  8. Redirect to /apps/files/files/1228?dir=/parent-folder-of-1228
  9. Infinity loop

TODO

  • Only execute the default file action for files, not folders

Screenshots

Before

folder-before.mp4

After

folder-after.mp4

Checklist

@ShGKmeShGKme added this to the Nextcloud 29 milestone Jan 27, 2024
@ShGKmeShGKme self-assigned this Jan 27, 2024
@ShGKme

Copy link
Copy Markdown
ContributorAuthor

/backport a8e4edb to stable28

@ShGKme
ShGKme requested review from a team, emoral435 and nfebeJanuary 30, 2024 11:28
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@ShGKme
ShGKmeforce-pushed the fix/files--do-not-open-folder-file-from-fileid-on-load branch from ba948fd to 99ac67fCompareFebruary 2, 2024 08:59
@ShGKme

Copy link
Copy Markdown
ContributorAuthor

Rebased onto master

@skjnldsv
skjnldsv merged commit 05dda07 into masterFeb 2, 2024
@skjnldsv
skjnldsv deleted the fix/files--do-not-open-folder-file-from-fileid-on-load branch February 2, 2024 13:56
@skjnldsvskjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Feb 2, 2024
@blizzzblizzz mentioned this pull request Mar 5, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to releaseReady to be released and/or waiting for tests to finishbugfeature: files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@ShGKme@susnux@skjnldsv@emoral435