nextcloud/server · error · Sabre\DAV\Exception\Forbidden

The {http://calendarserver.org/ns/}source property is requir

Error message

The {http://calendarserver.org/ns/}source property is required when creating subscriptions

What it means

Error "The {http://calendarserver.org/ns/}source property is required when creating subscriptions" thrown in nextcloud/server.

Source

Thrown at apps/dav/lib/CalDAV/CalDavBackend.php:3031

		return $subscriptions;
	}

	/**
	 * Creates a new subscription for a principal.
	 *
	 * If the creation was a success, an id must be returned that can be used to reference
	 * this subscription in other methods, such as updateSubscription.
	 *
	 * @param string $principalUri
	 * @param string $uri
	 * @param array $properties
	 * @return mixed
	 */
	#[\Override]
	public function createSubscription($principalUri, $uri, array $properties) {
		if (!isset($properties['{http://calendarserver.org/ns/}source'])) {
			throw new Forbidden('The {http://calendarserver.org/ns/}source property is required when creating subscriptions');
		}

		$values = [
			'principaluri' => $principalUri,
			'uri' => $uri,
			'source' => $properties['{http://calendarserver.org/ns/}source']->getHref(),
			'lastmodified' => time(),
		];

		$propertiesBoolean = ['striptodos', 'stripalarms', 'stripattachments'];

		foreach ($this->subscriptionPropertyMap as $xmlName => [$dbName, $type]) {
			if (array_key_exists($xmlName, $properties)) {
				$values[$dbName] = $properties[$xmlName];
				if (in_array($dbName, $propertiesBoolean)) {
					$values[$dbName] = true;
				}
			}

View on GitHub (pinned to ecdeb153ff)

When it happens

Trigger: Thrown at apps/dav/lib/CalDAV/CalDavBackend.php:3031 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/7d19e8dd6b0bc3ab. Report an issue: GitHub.