[Bug]: Webcal import drops VCALENDAR refresh interval properties
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 60/100
Hướng nghiên cứu
Start in apps/dav/lib/CalDAV/Import/TextImporter.php at analyze(), where calendar-level properties are written to an undefined local $components instead of $this->structure, then follow the VCALENDAR loop in ImportService::importText(). Check how RefreshWebcalService::updateRefreshRate() reads REFRESH-INTERVAL and X-PUBLISHED-TTL from the reconstructed object, and how RefreshWebcalJob falls back to the default. Done means the synthetic feed's PT1H is stored as the subscription refreshrate, and a regression test covers the VEVENT import and the refresh-rate update.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
⚠️ This issue respects the following points
- This is not a troubleshooting question, general support matter, or webserver/proxy problem, but likely a bug.
- This issue is not already reported on GitHub or solved at the Community Help Forum (searched for
TextImporter,REFRESH-INTERVAL,X-PUBLISHED-TTL, andcalendarSubscriptionRefreshRate). - I am using a maintained major version and reproduced this on the latest patch level, Nextcloud 35.0.2.
- I agree to follow Nextcloud's Code of Conduct.
- The reproduction below uses only synthetic calendar data.
Bug description
Nextcloud 35.0.2 successfully downloads and imports VEVENT objects from a Webcal subscription, but calendar-level refresh properties are lost while the text feed is split into individual VCALENDAR objects.
As a result, RefreshWebcalService::updateRefreshRate() cannot see either:
REFRESH-INTERVAL;VALUE=DURATION:PT1H
X-PUBLISHED-TTL:PT1H
The subscription's refreshrate remains empty and RefreshWebcalJob falls back to the app-wide default, which is P1D. Events import correctly when the job runs, but a feed advertising an hourly refresh can therefore be refreshed only once per day.
The behavior is visible in the current stable35 and master source:
TextImporter::analyze()writes calendar-level properties to a local, undefined$componentsvariable instead of$this->structure:
$components['VCALENDAR'][] = $data;
- Even if
$structure['VCALENDAR']were populated,ImportService::importText()does not append$entryto$sObjectPrefix; it only conditionally appends a line ending:
foreach ($structure['VCALENDAR'] as $entry) {
if (!str_ends_with($entry, "\n") || !str_ends_with($entry, "\r\n")) {
$sObjectPrefix .= PHP_EOL;
}
}
RefreshWebcalService::updateRefreshRate()reads the refresh properties from the last reconstructed per-object VCALENDAR. Those reconstructed objects no longer contain the original calendar-level properties.
Steps to reproduce
- Serve the following synthetic calendar over HTTPS:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Example//Webcal Refresh Test//EN
CALSCALE:GREGORIAN
REFRESH-INTERVAL;VALUE=DURATION:PT1H
X-PUBLISHED-TTL:PT1H
BEGIN:VEVENT
UID:[email protected]
DTSTAMP:20261109T120000Z
DTSTART:20261110T100000Z
DTEND:20261110T110000Z
SUMMARY:Webcal refresh test
END:VEVENT
END:VCALENDAR
- Add the URL as a new subscribed calendar in Nextcloud Calendar.
- Run system cron, or execute the matching
OCA\DAV\BackgroundJob\RefreshWebcalJob. - Confirm that the VEVENT is imported successfully.
- Inspect the subscription refresh property, for example read-only in
oc_calendarsubscriptions.refreshrate. - Observe that
refreshrateis still empty. - Observe that subsequent scheduling uses the default
calendarSubscriptionRefreshRate=P1D, not the feed'sPT1H.
A direct fetch of the same URL returns HTTP 200 and both refresh properties. Passing the response stream through ImportService::importText() yields the expected VEVENT, but the generated per-event VCALENDAR does not retain the refresh properties.
Expected behavior
Calendar-level properties needed by the Webcal refresh path should survive text import splitting. After the first successful refresh, the subscription should store PT1H, and RefreshWebcalJob should use that feed-provided interval.
A regression test should cover at least:
- preservation of
REFRESH-INTERVAL;VALUE=DURATION:PT1H; - preservation/fallback handling of
X-PUBLISHED-TTL:PT1H; - successful VEVENT import;
- updating the subscription refresh rate from the reconstructed object.
Nextcloud Server version
35.0.2
Operating system
Debian/Ubuntu (official Apache container image)
PHP engine version
PHP 8.5
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Observed after a major-version upgrade to Nextcloud 35. The affected import code is independent of migrated application data and is reproducible with a newly created subscription.
Are you using the Nextcloud Server Encryption module?
Encryption is disabled.
What user-backends are you using?
- Default user-backend (database)
Configuration report
Only the relevant DAV value is shown; no secrets or deployment-specific configuration are included:
{
"apps": {
"dav": {
"calendarSubscriptionRefreshRate": "P1D"
}
}
}
Setting calendarSubscriptionRefreshRate=PT1H is an effective global workaround, but it applies to every subscription and should not be required when a feed provides its own valid interval.
List of activated Apps
Not relevant to the minimal reproduction. The issue occurs in the server DAV Webcal import path.
Nextcloud Signing status
No code-integrity failures.
Nextcloud Logs
No network or parsing error is required to reproduce the issue. The HTTP request succeeds and VEVENT objects are imported.
Additional information
Affected source as of 2026-11-09:
stable35head inspected:b3adc84c0bfa409437f1cc76dc89c567e97b7172apps/dav/lib/CalDAV/Import/TextImporter.phpapps/dav/lib/CalDAV/Import/ImportService.phpapps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.phpapps/dav/lib/BackgroundJob/RefreshWebcalJob.php
The same relevant code is currently present in master.
- Ngôn ngữ chính
- PHP
- Star
- 37.5k
- Fork
- 5.4k
- Merge trung bình
- 1 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 639
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nextcloud/server
-
35-feedback
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
0. Needs triage 35-feedback bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
workflowengine: File entity reuses the node of the first "Tag assigned" event for all later events in the same processCó thể đã có người làm @lazerg đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Contacts import aborts with TypeError when vCards have no UID (TextImporter structure)Có thể đã có người làm @SebastianKrupinski đã nhận 6 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
nextcloud/server#66486 · 2 bình luận · 2 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Unified search: screen reader hears "No matching results" on mobile even when there are resultsCó thể đã có người làm @lazerg đã nhận 10 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của nextcloud/server
Issue tương tự
-
[Sync EN] stream: document the errors of the stream_context_*() and stream filter functions (#6091)Đang mởsync-en
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Automattic/blocks-engine#6318 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Update: Laravel Cheat Sheet - middleware examples for the bootstrap/app.php layout (small update)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
OWASP/CheatSheetSeries#2990 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày