Type error OC construct / custom app / collectives

after AiO updated to NC27 I get this log:

[cron] Error: TypeError: OC\User\User::__construct(): Argument #3 ($dispatcher) must be of type Symfony\Component\EventDispatcher\EventDispatcherInterface, OC\EventDispatcher\EventDispatcher given, called in /var/www/html/custom_apps/collectives/lib/Versions/CollectiveVersionsExpireManager.php on line 121 at <<closure>>

0. /var/www/html/custom_apps/collectives/lib/Versions/CollectiveVersionsExpireManager.php line 121
   OC\User\User->__construct("", null, ["OC\\EventDispatcher\\EventDispatcher"])
1. /var/www/html/custom_apps/collectives/lib/Versions/CollectiveVersionsExpireManager.php line 96
2. /var/www/html/custom_apps/collectives/lib/BackgroundJob/ExpirePageVersions.php line 35
3. /var/www/html/lib/public/BackgroundJob/Job.php line 78
4. /var/www/html/lib/public/BackgroundJob/TimedJob.php line 103
5. /var/www/html/lib/public/BackgroundJob/TimedJob.php line 93
6. /var/www/html/cron.php line 152
   OCP\BackgroundJob\TimedJob->execute(["OC\\BackgroundJob\\JobList"], ["OC\\Log"])

at 2023-08-20T16:05:23+00:00```

I haven't noticed dysfunctioning yet, but I'm currently tracking all logs, for a smoother experience

Nextcloud version 27.0.2
Operating system and version debian11

thanks for your concern

I’m getting the same error but wasn’t able to find out the reason so far.

Unfortunately this is a bug introduced with Collectives 2.7.0. It will be fixed with the patch from https://github.com/nextcloud/collectives/pull/833.

You can manually apply the patch if you feel capable to do so in the meantime.

The only impact of the bug though is that expired versions will not be deleted by the background job for now - so you can safely ignore it and wait for the next Collectives release if you prefer.

hi @mejo
thanks for your reply
do you mean the bug fix was integrated in the last Collectives update ?

Exactly, should be fixed with Collectives 2.7.1. Please report back if it’s not fixed for you with this version.

1 Like

indeed i’m not seeing any more logs about collectives
thanks for the explanation :slight_smile: