nextcloud/server · error · InvalidArgumentException
Birthday calendars are disabled
Error message
Birthday calendars are disabled
What it means
Thrown by verifyEnabled() at the very start of occ dav:sync-birthday-calendar when the global app config value dav/generateBirthdayCalendar is anything other than 'yes' (default is 'yes'). The feature was deliberately switched off, so the command refuses to run before touching any user. The per-user key of the same name only re-enables syncing for one user and does not bypass this global gate.
Source
Thrown at apps/dav/lib/Command/SyncBirthdayCalendar.php:86
$isEnabled = $this->config->getUserValue($userId, 'dav', 'generateBirthdayCalendar', 'yes');
if ($isEnabled !== 'yes') {
return;
}
/** @var IUser $user */
$this->birthdayService->syncUser($user->getUID());
});
$p->finish();
$output->writeln('');
return self::SUCCESS;
}
protected function verifyEnabled(): void {
$isEnabled = $this->config->getAppValue('dav', 'generateBirthdayCalendar', 'yes');
if ($isEnabled !== 'yes') {
throw new \InvalidArgumentException('Birthday calendars are disabled');
}
}
}
View on GitHub (pinned to ecdeb153ff)
Solutions
- Re-enable globally: `occ config:app:set dav generateBirthday-calendar --value yes` is wrong key — use `occ config:app:set dav generateBirthdayCalendar --value yes`, then re-run the sync
- Confirm the current value with `occ config:app:get dav generateBirthdayCalendar`
- If the feature must stay off, remove the sync job from cron instead of running the command
Example fix
# before occ dav:sync-birthday-calendar alice # InvalidArgumentException: Birthday calendars are disabled # after occ config:app:get dav generateBirthdayCalendar # -> no occ config:app:set dav generateBirthdayCalendar --value yes occ dav:sync-birthday-calendar alice
Defensive patterns
Strategy: validation
Validate before calling
#!/usr/bin/env bash if [ "$(occ config:app:get dav generateBirthdayCalendar)" != "yes" ]; then echo "Birthday calendars disabled globally — refusing to sync" >&2; exit 1 fi occ dav:sync-birthday-calendar "$@"
Prevention
- Gate the sync job on `occ config:app:get dav generateBirthdayCalendar` returning yes
- Distinguish the global app flag from the per-user flag of the same name
- Document intentional feature-off decisions so operators don't blindly re-enable
When it happens
Trigger: `occ dav:sync-birthday-calendar [uid]` after an admin ran `occ config:app:set dav generateBirthdayCalendar --value no` (common on instances that disable auto-generated birthday calendars).
Common situations: Performance tuning guides recommend disabling birthday calendars on large instances; admin re-enables per-user but forgets the global flag; inherited config from instance setup automation.
Related errors
- User <$user> in unknown.
- User $user has no calendar subscription with the URI $uri
- User $user is unknown
- User <$user> is unknown.
- User $user is unknown
AI-assisted analysis of nextcloud/server@ecdeb153ff (2026-08-17).
Data as JSON: /api/errors/f8d0606596a812fe.
Report an issue: GitHub.