{"record":{"id":"7d19e8dd6b0bc3ab","repo":"nextcloud/server","slug":"the-http-calendarserver-org-ns-source-property","errorCode":null,"errorMessage":"The {http://calendarserver.org/ns/}source property is required when creating subscriptions","messagePattern":"The (.+?)source property is required when creating subscriptions","errorType":"exception","errorClass":"Sabre\\DAV\\Exception\\Forbidden","httpStatus":403,"severity":"error","filePath":"apps/dav/lib/CalDAV/CalDavBackend.php","lineNumber":3031,"sourceCode":"\n\t\treturn $subscriptions;\n\t}\n\n\t/**\n\t * Creates a new subscription for a principal.\n\t *\n\t * If the creation was a success, an id must be returned that can be used to reference\n\t * this subscription in other methods, such as updateSubscription.\n\t *\n\t * @param string $principalUri\n\t * @param string $uri\n\t * @param array $properties\n\t * @return mixed\n\t */\n\t#[\\Override]\n\tpublic function createSubscription($principalUri, $uri, array $properties) {\n\t\tif (!isset($properties['{http://calendarserver.org/ns/}source'])) {\n\t\t\tthrow new Forbidden('The {http://calendarserver.org/ns/}source property is required when creating subscriptions');\n\t\t}\n\n\t\t$values = [\n\t\t\t'principaluri' => $principalUri,\n\t\t\t'uri' => $uri,\n\t\t\t'source' => $properties['{http://calendarserver.org/ns/}source']->getHref(),\n\t\t\t'lastmodified' => time(),\n\t\t];\n\n\t\t$propertiesBoolean = ['striptodos', 'stripalarms', 'stripattachments'];\n\n\t\tforeach ($this->subscriptionPropertyMap as $xmlName => [$dbName, $type]) {\n\t\t\tif (array_key_exists($xmlName, $properties)) {\n\t\t\t\t$values[$dbName] = $properties[$xmlName];\n\t\t\t\tif (in_array($dbName, $propertiesBoolean)) {\n\t\t\t\t\t$values[$dbName] = true;\n\t\t\t\t}\n\t\t\t}","sourceCodeStart":3013,"sourceCodeEnd":3049,"githubUrl":"https://github.com/nextcloud/server/blob/ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3/apps/dav/lib/CalDAV/CalDavBackend.php#L3013-L3049","documentation":"Error \"The {http://calendarserver.org/ns/}source property is required when creating subscriptions\" thrown in nextcloud/server.","triggerScenarios":"Thrown at apps/dav/lib/CalDAV/CalDavBackend.php:3031 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3","analyzedAt":"2026-08-17T01:36:13.386Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}