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

Latest release of groupfolders breaks GroupFoldersService.php #265

Closed
nkinkade opened this issue Aug 16, 2024 · 5 comments · Fixed by #266
Closed

Latest release of groupfolders breaks GroupFoldersService.php #265

nkinkade opened this issue Aug 16, 2024 · 5 comments · Fixed by #266
Assignees

Comments

@nkinkade
Copy link

The groupfolders app got a new release just a few hours ago, which apparently breaks this app. When groupfolders is updated, you get this error:

Too few arguments to function OCA\\GroupFolders\\Folder\\FolderManager::__construct(), 4 passed in /opt/nextcloud/apps/files_fulltextsearch/lib/Service/GroupFoldersService.php on line 67 and exactly 5 expected

It appears that the FolderManager now expects a 5th parameter of __construct() of type IEventDispatcher. The following patch appears to resolve the issue for me:

--- /opt/nextcloud/apps/files_fulltextsearch/lib/Service/GroupFoldersService.php	2024-08-16 17:26:55.935889984 +0000
+++ /opt/nextcloud/apps/files_fulltextsearch/lib/Service/GroupFoldersService.php.new	2024-08-16 17:26:29.906898303 +0000
@@ -38,6 +38,7 @@
 use OCA\Files_FullTextSearch\Tools\Traits\TArrayTools;
 use OCA\GroupFolders\Folder\FolderManager;
 use OCP\App\IAppManager;
+use OCP\EventDispatcher\IEventDispatcher;
 use OCP\Files\IMimeTypeLoader;
 use OCP\Files\Node;
 use OCP\FullTextSearch\Model\IIndex;
@@ -59,7 +60,8 @@
 		private IGroupManager $groupManager,
 		private LocalFilesService $localFilesService,
 		ConfigService $configService,
-		private LoggerInterface $logger
+		private LoggerInterface $logger,
+		private IEventDispatcher $eventDispatcher
 	) {
 		if ($configService->getAppValue(ConfigService::FILES_GROUP_FOLDERS) === '1'
 			&& $appManager->isEnabledForUser('groupfolders')) {
@@ -68,7 +70,8 @@
 					$dbConnection,
 					$groupManager,
 					$mimeTypeLoader,
-					$logger
+					$logger,
+					$eventDispatcher
 				);
 			} catch (Exception $e) {
 				return;
@rinal13
Copy link

rinal13 commented Aug 16, 2024

I added your patch, worked for me too by now

@codejp3
Copy link

codejp3 commented Aug 17, 2024

HUGE THANKS @nkinkade for this patch so quickly! Working like a charm.

The only thing I'd like to add is that generic error that showed in the log after updating and crashing NC:
AH01071: Got error "Primary script unknown"

With 'debug' = true, set in the config file, it didn't reveal anything of great detail either.

Had me chasing around nginx/apache issues for a while until I reset the VM to yesterday's backup and replicated the issue by updating to 17.0.2 again.

@julian70400
Copy link

Hey, 3 days ago we know this error, it break everything for everybody, why there is still not official patch ? It just brake my prod.

@AndyScherzinger
Copy link
Member

Currently @sorbaugh and @ArtificialOwl are looking into it.

@ArtificialOwl
Copy link
Member

Thanks @nkinkade for the report and the attached fix !

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

Successfully merging a pull request may close this issue.

7 participants