Skip to content

Conversation

@ShGKme
Copy link
Contributor

@ShGKme ShGKme commented Jan 27, 2024

  • 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

@ShGKme ShGKme added this to the Nextcloud 29 milestone Jan 27, 2024
@ShGKme ShGKme self-assigned this Jan 27, 2024
@ShGKme
Copy link
Contributor Author

ShGKme commented Jan 27, 2024

/backport a8e4edb to stable28

@ShGKme ShGKme requested review from a team, emoral435 and nfebe January 30, 2024 11:28
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@ShGKme ShGKme force-pushed the fix/files--do-not-open-folder-file-from-fileid-on-load branch from ba948fd to 99ac67f Compare February 2, 2024 08:59
@ShGKme
Copy link
Contributor Author

ShGKme commented Feb 2, 2024

Rebased onto master

@skjnldsv skjnldsv merged commit 05dda07 into master Feb 2, 2024
@skjnldsv skjnldsv deleted the fix/files--do-not-open-folder-file-from-fileid-on-load branch February 2, 2024 13:56
@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 Feb 2, 2024
@blizzz blizzz mentioned this pull request Mar 5, 2024
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 feature: files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants