nextcloud/server · error · Sabre\DAV\Exception\BadRequest
A valid calendar object must contain at least one VJOURNAL,
Error message
A valid calendar object must contain at least one VJOURNAL, VEVENT, or VTODO component type
What it means
Error "A valid calendar object must contain at least one VJOURNAL, VEVENT, or VTODO component type" thrown in nextcloud/server.
Source
Thrown at apps/dav/lib/CalDAV/CalDavBackend.php:3429
* * lastOccurence
* * uid - value of the UID property
*
* @param string $calendarData
* @return array
*/
public function getDenormalizedData(string $calendarData): array {
$derived = [
'etag' => md5($calendarData),
'size' => strlen($calendarData),
];
// validate data and extract base component
/** @var VCalendar $vObject */
$vObject = Reader::read($calendarData);
/** @var \Sabre\VObject\Component\VEvent[]|\Sabre\VObject\Component\VTodo[]|\Sabre\VObject\Component\VJournal[] $components */
$components = $vObject->getBaseComponents();
if (count($components) !== 1) {
throw new BadRequest('A valid calendar object must contain at least one VJOURNAL, VEVENT, or VTODO component type');
}
$component = $components[0];
// extract basic information
$derived['componentType'] = $component->name;
$derived['uid'] = $component->UID ? $component->UID->getValue() : null;
$derived['classification'] = $component->CLASS ? match ($component->CLASS->getValue()) {
'PUBLIC' => self::CLASSIFICATION_PUBLIC,
'CONFIDENTIAL' => self::CLASSIFICATION_CONFIDENTIAL,
default => self::CLASSIFICATION_PRIVATE,
} : self::CLASSIFICATION_PUBLIC;
// extract start and end dates
// VTODO components can have no start date
/** @var */
$startDate = $component->DTSTART instanceof \Sabre\VObject\Property\ICalendar\DateTime ? $component->DTSTART->getDateTime() : null;
$endDate = $startDate ? clone $startDate : null;
if ($startDate) {
// Recurring
if ($component->RRULE || $component->RDATE) {View on GitHub (pinned to ecdeb153ff)
When it happens
Trigger: Thrown at apps/dav/lib/CalDAV/CalDavBackend.php:3429 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of nextcloud/server@ecdeb153ff (2026-08-17).
Data as JSON: /api/errors/8ff2331a799cab85.
Report an issue: GitHub.