https://bugs.kde.org/show_bug.cgi?id=524769

            Bug ID: 524769
           Summary: Akonadi DAV resource does not synchronize calendar
                    events created or modified while offline
    Classification: Frameworks and Libraries
           Product: Akonadi
      Version First 6.8.0
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: DAV Resource
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

Created attachment 195485
  --> https://bugs.kde.org/attachment.cgi?id=195485&action=edit
konadi Console log

KOrganizer/Akonadi does not synchronize calendar events that were
created or modified while the computer was offline.

The CalDAV calendar itself already existed on the server and had
already been synchronized with Akonadi before going offline.

Environment:
- Arch Linux
- KDE PIM 26.08.0
- Akonadi 26.08.0
- akonadi-calendar 26.08.0
- kdepim-runtime 26.08.0
- KDAV 6.29.0
- KCalendarCore 6.29.0
- KOrganizer 6.8.0 (26.08.1)
- Radicale 3.7.6.0

CalDAV server: Radicale

Steps to reproduce:

1. Create a CalDAV calendar on the Radicale server while the
   computer is online.
2. Wait for the calendar to appear in KOrganizer/Akonadi.
3. Disconnect the computer from the network.
4. Create several events in this existing calendar while offline.
5. Reconnect the computer to the network.
6. Wait for Akonadi/DAV synchronization.
7. The calendar remains available and synchronized.
8. The events created while offline are still present locally in
   KOrganizer and Merkuro, but are not uploaded to Radicale.
9. In AkonadiConsole's Browser, these events have an empty
   Remote-ID.
10. Create a new event in the same calendar while online.
11. This new event is correctly uploaded to Radicale and receives a
    Remote-ID.
12. Modify one of the previously unsynchronized events while online.
13. The modification is correctly stored in Akonadi, but the event
    is still not uploaded to Radicale and its Remote-ID remains empty.

Expected behavior:

Events created or modified while offline should be queued by Akonadi
and synchronized with the CalDAV server when the connection is
restored.

Actual behavior:

Events created while offline remain local indefinitely. They have an
empty Remote-ID and are not uploaded after reconnecting.

Interestingly, events created while online in the same calendar are
synchronized correctly.

Modifying an unsynchronized event while online does not fix the
problem.

The problem persists after restarting Akonadi and after rebooting the
computer.
It also persists after upgrading the complete KDE PIM stack to the
versions listed above.

For example, item 1969 was created while offline.

Before modification, Akonadi reports:

id: 1969
remoteId: ""
revision: 0

I then changed the event title from "Titi Gym" to "Titi Gym2".

KOrganizer sends the following modification to Akonadi:

ModifyItems
items: [1969]
dirty: true
modifiedParts: ["PLD:RFC822"]
remoteId: ""

Akonadi accepts the modification:

ModifyItems
error: false
id: 1969
newRevision: 1

However, there is no corresponding operation from
akonadi_davgroupware_resource_0 to upload item 1969.

No PUT to the CalDAV server occurs, and the item's Remote-ID remains
empty.

By contrast, events created while online in the same calendar are
successfully uploaded and receive a Remote-ID.

This appears to be related to the handling of locally created/modified
items by the DAV resource while offline.

A similar symptom was discussed in KDE Discuss:
https://discuss.kde.org/t/korganizer-saves-in-nextcloud-only-after-akonadi-restart/48458

In that discussion, the logs also showed that some locally modified
items did not result in the expected DAV resource notification/PUT,
while newly created items could be synchronized correctly.

I am using Radicale rather than Nextcloud, so this may be independent
of the server implementation.

The attached file is the Akonadi Console log captured on the PC while it was
online, at the time an event that had been created offline was modified.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to