Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Clicking on deleted file in trash bin leads nowhere #40936

Closed
4 of 8 tasks
ostasevych opened this issue Oct 16, 2023 · 6 comments · Fixed by nextcloud/viewer#2093
Closed
4 of 8 tasks

[Bug]: Clicking on deleted file in trash bin leads nowhere #40936

ostasevych opened this issue Oct 16, 2023 · 6 comments · Fixed by nextcloud/viewer#2093

Comments

@ostasevych
Copy link

ostasevych commented Oct 16, 2023

⚠️ This issue respects the following points: ⚠️

Bug description

From time to time when I click on any file (doc, spreadsheet or presentation, pdf, zip archive) which has been removed and placed to the trash bin I am lead to the page which cannot be reached, eg when I try to delete file.pdf: https://mycloud.tld/remote.php/dav/trashbin/username/trash/file.pdf.d1695049824.

But on other files I am prompted to download it.

Steps to reproduce

  1. Remove some file
  2. Observe it in your trash bin
  3. Click over it
  4. One file you are prompted to download it, another I see the page See that you are lead to the page "This site can’t be reached"

Expected behavior

The behaviour should be the same: either to download, or show the file (more preferable).

Installation method

Community Web installer on a VPS or web space

Nextcloud Server version

27

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

@ostasevych ostasevych added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Oct 16, 2023
@ostasevych
Copy link
Author

ostasevych commented Oct 16, 2023

The nextcloud log shows when I try to click over deleted file.pdf:

[webdav] Помилка: TypeError: fwrite(): Argument #2 ($data) must be of type string, bool given at <<closure>>

0. /var/www/html/nextcloud/3rdparty/sabre/http/lib/Sapi.php line 127
   fwrite()
1. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 490
   Sabre\HTTP\Sapi::sendResponse()
2. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
   Sabre\DAV\Server->invokeMethod()
3. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
   Sabre\DAV\Server->start()
4. /var/www/html/nextcloud/apps/dav/lib/Server.php line 365
   Sabre\DAV\Server->exec()
5. /var/www/html/nextcloud/apps/dav/appinfo/v2/remote.php line 35
   OCA\DAV\Server->exec()
6. /var/www/html/nextcloud/remote.php line 172
   require_once("/var/www/html/n ... p")

GET /remote.php/dav/trashbin/username/trash/file.pdf.d1695471152
from ***.***.***.*** by username at 2023-10-16T21:08:12+03:00

...

[webdav] Помилка: TypeError: fwrite(): Argument #2 ($data) must be of type string, bool given at <<closure>>

0. /var/www/html/nextcloud/3rdparty/sabre/http/lib/Sapi.php line 127
   fwrite()
1. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 490
   Sabre\HTTP\Sapi::sendResponse()
2. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
   Sabre\DAV\Server->invokeMethod()
3. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
   Sabre\DAV\Server->start()
4. /var/www/html/nextcloud/apps/dav/lib/Server.php line 365
   Sabre\DAV\Server->exec()
5. /var/www/html/nextcloud/apps/dav/appinfo/v2/remote.php line 35
   OCA\DAV\Server->exec()
6. /var/www/html/nextcloud/remote.php line 172
   require_once("/var/www/html/n ... p")

GET /remote.php/dav/trashbin/username/trash/file.pdf.d1695471152
from ***.***.***.*** by username at 2023-10-16T21:08:14+03:00

...

[remote] Помилка: TypeError: OCA\DAV\Files\BrowserErrorPagePlugin::logException(): Argument #1 ($ex) must be of type Exception, TypeError given, called in /var/www/html/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php on line 89 at <<closure>>

0. /var/www/html/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
   OCA\DAV\Files\BrowserErrorPagePlugin->logException()
1. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 256
   Sabre\DAV\Server->emit()
2. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
   Sabre\DAV\Server->start()
3. /var/www/html/nextcloud/apps/dav/lib/Server.php line 365
   Sabre\DAV\Server->exec()
4. /var/www/html/nextcloud/apps/dav/appinfo/v2/remote.php line 35
   OCA\DAV\Server->exec()
5. /var/www/html/nextcloud/remote.php line 172
   require_once("/var/www/html/n ... p")

GET /remote.php/dav/trashbin/username/trash/file.%D0%9E.file.pdf.d1695471152
from ***.***.***.*** by username at 2023-10-16T21:08:14+03:00

@Pytal
Copy link
Member

Pytal commented Nov 28, 2023

It was suggested by @blizzz that we revert back to 26 behaviour and prevent clicking on files in trashbin

@artonge artonge added this to the Nextcloud 28 milestone Nov 28, 2023
@blizzz
Copy link
Member

blizzz commented Dec 5, 2023

Do we have a status here?

@Pytal
Copy link
Member

Pytal commented Dec 5, 2023

  • On stable26 files in trashbin are not clickable
  • On stable27 click triggers download
  • On stable28 + master on first click '"Delete" action executed successfully', subsequent clicks “This file no longer exists”

What do you think about reverting back to 26 behaviour @skjnldsv?

@skjnldsv
Copy link
Member

skjnldsv commented Dec 5, 2023

  • On stable26 files in trashbin are not clickable

But they were a link and could be opened in a new tab.
I think exposing the ressource is a good thing (instead of hiding it behind javascript click prevent)

There is a bug for 28, it used to be like 27, something changed. Delete should not be a default action

return this.enabledActions.filter(action => !!action?.default)

The check is probably the issue, we should check if default is undefined instead of something else. Therefore the "delete permanently" action would not be used as "default"

@Pytal Pytal self-assigned this Dec 5, 2023
@Pytal Pytal added 3. to review Waiting for reviews and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Dec 5, 2023
@blizzz
Copy link
Member

blizzz commented Dec 15, 2023

  • On stable26 files in trashbin are not clickable

But they were a link and could be opened in a new tab.

That is actually not the case.

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

Successfully merging a pull request may close this issue.

7 participants