-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Fix a TypeError on OC\Files\Cache\QuerySearchHelper::getCachesAndMoun… #38824
Closed
ajabep
wants to merge
1
commit into
nextcloud:master
from
ajabep:Fix-TypeError-QuerySearchHelper-getCachesAndMountPointsForSearch
Closed
Fix a TypeError on OC\Files\Cache\QuerySearchHelper::getCachesAndMoun… #38824
ajabep
wants to merge
1
commit into
nextcloud:master
from
ajabep:Fix-TypeError-QuerySearchHelper-getCachesAndMountPointsForSearch
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…tPointsForSearch() I added to `OCP\Files\IRootFolder` the signature of `*mount` and `getMount*` method and make `OC\Files\Cache\QuerySearchHelper::getCachesAndMountPointsForSearch()` requiering an `OCP\Files\IRootFolder` instead of a `OC\Files\Node\Root`. Formated log of the error which occurs SOOOOOOOOO many times (deployed via NextCloud-AIO): [webdav] Error: TypeError: OC\Files\Cache\QuerySearchHelper::getCachesAndMountPointsForSearch(): Argument nextcloud#1 ($root) must be of type OC\Files\Node\Root, OC\Files\Node\LazyRoot given, called in /var/www/html/lib/private/Files/Node/Folder.php on line 237 at <<closure>> 0. /var/www/html/lib/private/Files/Node/Folder.php line 237 OC\Files\Cache\QuerySearchHelper->getCachesAndMountPointsForSearch(["OC\\Files\\Node\\LazyRoot"], "/XXX/files/Being uploaded", false) 1. /var/www/html/lib/private/Files/Node/Folder.php line 291 OC\Files\Node\Folder->search(["OC\\Files\\Search\\SearchQuery"]) 2. /var/www/html/custom_apps/music/lib/Utility/Scanner.php line 383 OC\Files\Node\Folder->searchByMime("audio") 3. /var/www/html/custom_apps/music/lib/Hooks/FileHooks.php line 42 OCA\Music\Utility\Scanner->deleteFolder(["OC\\Files\\Node\\Folder"]) 4. <<closure>> OCA\Music\Hooks\FileHooks::deleted(["OC\\Files\\Node\\Folder"]) 5. /var/www/html/lib/private/Hooks/EmitterTrait.php line 105 call_user_func_array(["OCA\\Music\\Ho ... "], [["OC\\Files\\Node\\Folder"]]) 6. /var/www/html/lib/private/Hooks/PublicEmitter.php line 40 OC\Hooks\BasicEmitter->emit("\\OC\\Files", "preDelete", [["OC\\Files\\Node\\Folder"]]) 7. /var/www/html/lib/private/Files/Node/Root.php line 143 OC\Hooks\PublicEmitter->emit("\\OC\\Files", "preDelete", [["OC\\Files\\Node\\Folder"]]) 8. <<closure>> OC\Files\Node\Root->emit("\\OC\\Files", "preDelete", [["OC\\Files\\Node\\Folder"]]) 9. /var/www/html/lib/private/Files/Node/LazyFolder.php line 72 call_user_func_array([["OC\\Files\\Node\\Root"],"emit"], ["\\OC\\Files"," ... ]]) 10. /var/www/html/lib/private/Files/Node/LazyFolder.php line 100 OC\Files\Node\LazyFolder->__call("emit", ["\\OC\\Files"," ... ]]) 11. /var/www/html/lib/private/Files/Node/HookConnector.php line 145 OC\Files\Node\LazyFolder->emit("\\OC\\Files", "preDelete", [["OC\\Files\\Node\\Folder"]]) 12. /var/www/html/lib/private/legacy/OC_Hook.php line 105 OC\Files\Node\HookConnector->delete([true,"/Being uploaded"]) 13. /var/www/html/lib/private/Files/View.php line 1295 OC_Hook::emit("OC_Filesystem", "delete", [true,"/Being uploaded"]) 14. /var/www/html/lib/private/Files/View.php line 1165 OC\Files\View->runHooks(["delete"], "/Being uploaded") 15. /var/www/html/lib/private/Files/View.php line 351 OC\Files\View->basicOperation("rmdir", "/Being uploaded", ["delete"]) 16. /var/www/html/apps/dav/lib/Connector/Sabre/Directory.php line 307 OC\Files\View->rmdir("/Being uploaded") 17. /var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php line 179 OCA\DAV\Connector\Sabre\Directory->delete() 18. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 281 Sabre\DAV\Tree->delete("files/XXX/Being uploaded") 19. /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89 Sabre\DAV\CorePlugin->httpDelete(["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"]) 20. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 472 Sabre\DAV\Server->emit("method:DELETE", [["Sabre\\HTTP\\ ... ]]) 21. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 253 Sabre\DAV\Server->invokeMethod(["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"]) 22. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 321 Sabre\DAV\Server->start() 23. /var/www/html/apps/dav/lib/Server.php line 366 Sabre\DAV\Server->exec() 24. /var/www/html/apps/dav/appinfo/v2/remote.php line 35 OCA\DAV\Server->exec() 25. /var/www/html/remote.php line 172 require_once("/var/www/html/a ... p") DELETE /remote.php/dav/files/XXX/Being%20uploaded from XXX.XXX.XXX.XXX by XXX at 2023-06-14T16:22:40+00:00 Signed-off-by: Ajabep <ajabep@tutanota.com>
Thanks 👍 Looks similar to #38625. |
Thank you for your review. Indeed, it seems that this PR is a duplicated. Thus, I close this PR. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Just an error by using
LazyRootFolder
:)I added to
OCP\Files\IRootFolder
the signature of*mount
andgetMount*
method and makeOC\Files\Cache\QuerySearchHelper::getCachesAndMountPointsForSearch()
requiering anOCP\Files\IRootFolder
instead of aOC\Files\Node\Root
.Formated log of the error which occurs SOOOOOOOOO many times (deployed via NextCloud-AIO):
Checklist
php -l
and tested in prod on my server)