[GH-ISSUE #2401] CalDAV: Collections missing sync-token / getctag / getetag — breaks spec-compliant clients #6667

Closed
opened 2026-04-20 17:15:29 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @surfingbytes on GitHub (Mar 16, 2026).
Original GitHub issue: https://github.com/go-vikunja/vikunja/issues/2401

Pre-submission checklist

  • I have searched for existing open or closed issue reports with the same problem.

Description

Vikunja's CalDAV collections do not return DAV:sync-token, CS:getctag, or DAV:getetag properties. When a client sends a PROPFIND on /dav/projects with Depth: 1 requesting these properties, Vikunja returns 404 Not Found for all of them:

<D:propstat>
  <D:prop>
    <D:getetag/>
    <CS:getctag/>
  </D:prop>
  <D:status>HTTP/1.1 404 Not Found</D:status>
</D:propstat>

These are standard CalDAV/WebDAV properties required by the respective specifications:

  • DAV:sync-token — RFC 6578, §4: "The DAV:sync-token property MUST be defined on all resources that support the DAV:sync-collection report."
  • CS:getctag — caldav-ctag-03, §4.1 (deprecated but widely used for backwards compatibility): "This property MUST be defined on a calendar or scheduling Inbox or Outbox collection resource."
  • DAV:getetag — RFC 4918, §15.6: "The getetag property MUST be defined on any DAV-compliant resource that returns the Etag header."

Clients that follow the spec (e.g. Python caldav library, used by Home Assistant) rely on these properties to uniquely identify collections and detect changes. Without them:

  • Home Assistant: Only the first todo list gets registered. All subsequent ones are rejected as duplicates because the library cannot distinguish between collections:
    Platform caldav does not generate unique IDs. ID xxx-projects already exists - ignoring todo.<name>
    
  • All clients: Without sync-token or getctag, clients have no way to efficiently detect collection-level changes and must re-download all items on every sync.

This likely affects any spec-compliant CalDAV client, not just Home Assistant.

Each collection should return unique sync-token and getetag values. For example:

<D:sync-token>http://vikunja.io/ns/sync/project-13-1710512345</D:sync-token>
<D:getetag>"project-13-1710512345"</D:getetag>

For backwards compatibility with older clients, CS:getctag should also be supported (its value can mirror sync-token).

Vikunja Version

v2.1.0

Browser and version

No response

Can you reproduce the bug on the Vikunja demo site?

Yes

Screenshots

No response

Originally created by @surfingbytes on GitHub (Mar 16, 2026). Original GitHub issue: https://github.com/go-vikunja/vikunja/issues/2401 ### Pre-submission checklist - [x] I have searched for existing open or closed issue reports with the same problem. ### Description Vikunja's CalDAV collections do not return `DAV:sync-token`, `CS:getctag`, or `DAV:getetag` properties. When a client sends a PROPFIND on `/dav/projects` with `Depth: 1` requesting these properties, Vikunja returns `404 Not Found` for all of them: ```xml <D:propstat> <D:prop> <D:getetag/> <CS:getctag/> </D:prop> <D:status>HTTP/1.1 404 Not Found</D:status> </D:propstat> ``` These are standard CalDAV/WebDAV properties required by the respective specifications: - **`DAV:sync-token`** — RFC 6578, §4: *"The DAV:sync-token property MUST be defined on all resources that support the DAV:sync-collection report."* - **`CS:getctag`** — caldav-ctag-03, §4.1 (deprecated but widely used for backwards compatibility): *"This property MUST be defined on a calendar or scheduling Inbox or Outbox collection resource."* - **`DAV:getetag`** — RFC 4918, §15.6: *"The getetag property MUST be defined on any DAV-compliant resource that returns the Etag header."* Clients that follow the spec (e.g. Python `caldav` library, used by Home Assistant) rely on these properties to uniquely identify collections and detect changes. Without them: - **Home Assistant**: Only the first todo list gets registered. All subsequent ones are rejected as duplicates because the library cannot distinguish between collections: ``` Platform caldav does not generate unique IDs. ID xxx-projects already exists - ignoring todo.<name> ``` - **All clients**: Without `sync-token` or `getctag`, clients have no way to efficiently detect collection-level changes and must re-download all items on every sync. This likely affects any spec-compliant CalDAV client, not just Home Assistant. Each collection should return unique `sync-token` and `getetag` values. For example: ```xml <D:sync-token>http://vikunja.io/ns/sync/project-13-1710512345</D:sync-token> <D:getetag>"project-13-1710512345"</D:getetag> ``` For backwards compatibility with older clients, `CS:getctag` should also be supported (its value can mirror `sync-token`). ### Vikunja Version v2.1.0 ### Browser and version _No response_ ### Can you reproduce the bug on the Vikunja demo site? Yes ### Screenshots _No response_
GiteaMirror added the area/caldav label 2026-04-20 17:15:29 -05:00
Author
Owner

@vikunja-bot-app[bot] commented on GitHub (Mar 26, 2026):

This issue has been fixed in #1, please check with the next unstable build (should be ready for deployment in ~30min, also on the demo).

<!-- gh-comment-id:4132961693 --> @vikunja-bot-app[bot] commented on GitHub (Mar 26, 2026): This issue has been fixed in #1, please check with the next unstable build (should be ready for deployment in ~30min, also on [the demo](https://try.vikunja.io)).
Author
Owner

@kolaente commented on GitHub (Mar 26, 2026):

I guess we need to refine the bot

<!-- gh-comment-id:4132970270 --> @kolaente commented on GitHub (Mar 26, 2026): I guess we need to refine the bot
Author
Owner

@vikunja-bot-app[bot] commented on GitHub (Mar 26, 2026):

This issue has been fixed in #2482, please check with the next unstable build (should be ready for deployment in ~30min, also on the demo).

<!-- gh-comment-id:4133582292 --> @vikunja-bot-app[bot] commented on GitHub (Mar 26, 2026): This issue has been fixed in #2482, please check with the next unstable build (should be ready for deployment in ~30min, also on [the demo](https://try.vikunja.io)).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#6667