Steps to reproduce
- As admin, configure at least one public calendar for users to subscribe to
- e.g.
php occ config:app:set calendar publicCalendars --value '[{"name":"de-holidays","source":"https://www.feiertage-deutschland.de/kalender-download/ical/feiertage-deutschland.ics"}]'
- As user click "Add custom public calendar"

- Subscribe to a public calendar e.g.
de-holidays
- Open "Add custom public calendar` again
Expected behavior
The subscribed calendar cannot be subscribed again.
Actual behavior
The calendar can be subscribed again:
Calendar app version
6.2.2
CalDAV-clients used
No response
Browser
No response
Client operating system
No response
Server operating system
No response
Web server
None
Database engine version
None
PHP engine version
None
Nextcloud version
32.0.6.1
Updated from an older installed version or fresh install
fresh
List of activated apps
Nextcloud configuration
Web server error log
Log file
Browser log
Additional info
The issues seems to be, that X-NC-CalDAV-Webcal-Caching is not set correctly:
-
Code tries to set header X-NC-CalDAV-Webcal-Caching to Off when using a DavClient.
|
export async function findAllSubscriptions() { |
|
const headers = { |
|
'X-NC-CalDAV-Webcal-Caching': 'Off', |
|
} |
|
|
|
// Ensure the client is initialized once |
|
await getClient(headers).connect({ enableCalDAV: true }) |
|
|
|
return getCalendarHome(headers).findAllSubscriptions() |
|
} |
-
But headers in getClient is only used as a cache key and never used when creating the client, so X-NC-CalDAV-Webcal-Caching is always On.
|
function getClient(headers = {}) { |
|
const clientKey = getClientKey(headers) |
|
if (clients[clientKey]) { |
|
return clients[clientKey] |
|
} |
|
|
|
clients[clientKey] = new DavClient({ |
|
rootUrl: generateRemoteUrl('dav'), |
|
defaultHeaders: { |
|
'X-NC-CalDAV-Webcal-Caching': 'On', |
|
}, |
|
}) |
|
|
|
return clients[clientKey] |
|
} |
Seems to have accidentally broken in a refactoring/dependency upgrade: 8d13b4c
Steps to reproduce
php occ config:app:set calendar publicCalendars --value '[{"name":"de-holidays","source":"https://www.feiertage-deutschland.de/kalender-download/ical/feiertage-deutschland.ics"}]'de-holidaysExpected behavior
The subscribed calendar cannot be subscribed again.
Actual behavior
The calendar can be subscribed again:
Calendar app version
6.2.2
CalDAV-clients used
No response
Browser
No response
Client operating system
No response
Server operating system
No response
Web server
None
Database engine version
None
PHP engine version
None
Nextcloud version
32.0.6.1
Updated from an older installed version or fresh install
fresh
List of activated apps
Nextcloud configuration
Web server error log
Log file
Browser log
Additional info
The issues seems to be, that
X-NC-CalDAV-Webcal-Cachingis not set correctly:Code tries to set header
X-NC-CalDAV-Webcal-CachingtoOffwhen using aDavClient.calendar/src/services/caldavService.js
Lines 72 to 81 in eaa56a0
But
headersingetClientis only used as a cache key and never used when creating the client, soX-NC-CalDAV-Webcal-Cachingis alwaysOn.calendar/src/services/caldavService.js
Lines 13 to 27 in eaa56a0
Seems to have accidentally broken in a refactoring/dependency upgrade: 8d13b4c