Nextcloud : impossible d'accéder à la corbeille

Donc l’erreur c’est

Return value of OCA\\Files_Trashbin\\Sabre\\AbstractTrash::getSize() must be of the type int, float returned

Une recherche avec l’erreur dans startpage donne en premier lien ce sujet: Trash bin: AbstractTrash::getSize() must be of the type integer, float returned · Issue #13160 · nextcloud/server · GitHub

Je cite ici 2 solutions:

  • Editer le fichier AbstractTrash.php

I fixed it locally by explicitly casting to int in method getSize() in AbstractTrash.php. It now looks like this now:

public function getSize(): int {
    return (int)$this->data->getSize();
}

It works for me too, thanks!

  • OU utiliser fsck (le problème serait dû à des fichiers corrompues

I unmounted the partition and let sudo fsck -v run through it. After that I made a filescan with sudo /snap/bin/nextcloud.occ files:scan --all and after that, the trashbin works fine without editing the AbstractTrash.php.