nextcloud / nextcloud/calendar
Deleting the first event of an event series makes the whole series uneditable
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 332
- Avg merge
- 16h 13m
- Merged PRs (30d)
- 137
Description
Steps to reproduce
- Create an event with recurrence
- Delete the first event
- Try to change the name of the remaining events by changing the name of the (now) first event in the series and "update this and all future"
Expected behavior
The name of all remaining events in the series should change
Actual behaviour
You get an error "Failed to save event", nothing changes.
Note: Weirdly it works fine when you change the name for all remaining events apart from the first
The logfile shows the error: NoInstancesException This recurrence rule does not generate any valid instances
Calendar app version
4.7.13
CalDAV-clients used
Web interface
Browser
Firefox
Nextcloud version
28.0.6
Log file
Log
```Text # Formatted log: /var/www/html/apps/dav/lib/CalDAV/CalDavBackend.phpline 2854Sabre\VObject\Recur\EventIterator->__construct(
[
[
"Sabre\\VObject\\Component\\VEvent",
[
"Sabre\\VObject\\Component\\VCalendar",
"*** sensitive parameters replaced ***",
"VCALENDAR"
],
"VEVENT"
]
]
)
/var/www/html/apps/dav/lib/CalDAV/CalDavBackend.phpline 1331
OCA\DAV\CalDAV\CalDavBackend->getDenormalizedData(
"*** sensitive parameters replaced ***"
)
/var/www/html/3rdparty/sabre/dav/lib/CalDAV/CalendarObject.phpline 103
OCA\DAV\CalDAV\CalDavBackend->updateCalendarObject(
"*** sensitive parameters replaced ***"
)
/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.phpline 1137
Sabre\CalDAV\CalendarObject->put(
"*** sensitive parameters replaced ***"
)
/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.phpline 492
Sabre\DAV\Server->updateFile(
"*** sensitive parameters replaced ***"
)
/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.phpline 89
Sabre\DAV\CorePlugin->httpPut(
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
)
/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.phpline 472
Sabre\DAV\Server->emit(
"method:PUT",
[
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
)
/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.phpline 253
Sabre\DAV\Server->invokeMethod(
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
)
/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.phpline 321
Sabre\DAV\Server->start()
/var/www/html/apps/dav/lib/Server.phpline 373
Sabre\DAV\Server->exec()
/var/www/html/apps/dav/appinfo/v2/remote.phpline 35
OCA\DAV\Server->exec()
/var/www/html/remote.phpline 172
undefinedundefinedrequire_once(
"/var/www/html/apps/dav/appinfo/v2/remote.php"
)
Raw log entry
{
"reqId": "",
"level": 3,
"time": "2024-07-24T16:11:34+00:00",
"remoteAddr": "...",
"user": "...",
"app": "webdav",
"method": "PUT",
"url": "/remote.php/dav/calendars/...",
"message": "This recurrence rule does not generate any valid instances",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0",
"version": "28.0.6.1",
"exception": {
"Exception": "Sabre\VObject\Recur\NoInstancesException",
"Message": "This recurrence rule does not generate any valid instances",
"Code": 0,
"Trace": [
{
"file": "/var/www/html/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 2854,
"function": "__construct",
"class": "Sabre\VObject\Recur\EventIterator",
"type": "->",
"args": [
[
[
"Sabre\VObject\Component\VEvent",
[
"Sabre\VObject\Component\VCalendar",
"*** sensitive parameters replaced ",
"VCALENDAR"
],
"VEVENT"
]
]
]
},
{
"file": "/var/www/html/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 1331,
"function": "getDenormalizedData",
"class": "OCA\DAV\CalDAV\CalDavBackend",
"type": "->",
"args": [
" sensitive parameters replaced "
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/CalDAV/CalendarObject.php",
"line": 103,
"function": "updateCalendarObject",
"class": "OCA\DAV\CalDAV\CalDavBackend",
"type": "->",
"args": [
" sensitive parameters replaced "
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 1137,
"function": "put",
"class": "Sabre\CalDAV\CalendarObject",
"type": "->",
"args": [
" sensitive parameters replaced "
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 492,
"function": "updateFile",
"class": "Sabre\DAV\Server",
"type": "->",
"args": [
" sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line": 89,
"function": "httpPut",
"class": "Sabre\DAV\CorePlugin",
"type": "->",
"args": [
[
"Sabre\HTTP\Request"
],
[
"Sabre\HTTP\Response"
]
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 472,
"function": "emit",
"class": "Sabre\DAV\Server",
"type": "->",
"args": [
"method:PUT",
[
[
"Sabre\HTTP\Request"
],
[
"Sabre\HTTP\Response"
]
]
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 253,
"function": "invokeMethod",
"class": "Sabre\DAV\Server",
"type": "->",
"args": [
[
"Sabre\HTTP\Request"
],
[
"Sabre\HTTP\Response"
]
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 321,
"function": "start",
"class": "Sabre\DAV\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/apps/dav/lib/Server.php",
"line": 373,
"function": "exec",
"class": "Sabre\DAV\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/apps/dav/appinfo/v2/remote.php",
"line": 35,
"function": "exec",
"class": "OCA\DAV\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/remote.php",
"line": 172,
"args": [
"/var/www/html/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/var/www/html/3rdparty/sabre/vobject/lib/Recur/EventIterator.php",
"Line": 192,
"message": "This recurrence rule does not generate any valid instances",
"exception": [],
"CustomMessage": "This recurrence rule does not generate any valid instances"
},
"id": "..."
}
</details>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at apps/dav/lib/CalDAV/CalDavBackend.php around lines 1331 and 2854, following the updateCalendarObject and getDenormalizedData path into Sabre VObject’s EventIterator. Reproduce the recurrence scenario from the issue and inspect why deleting the first event causes NoInstancesException. Done means the remaining series can be renamed with “update this and all future” without the save error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100