CalDav Sync of Notes-Field in Tasks does not work properly

Hi!
I connected my tasks via CalDav with a NextCloud installation. There are some tasks where I just change the notes regularly while the rest of the task stays untouched. These changes are partly done using an Android app (CalenGoo) that also syncs with my NextCloud installation. While the sync between Nextcloud and CalenGoo works correctly in both directions, the sync from Nextcloud to eM Client concerning the changed notes belonging to a task doesn’t. Suddenly parts of the changes are missing in the task-notes in eM Client or the notes are completely erased. Luckily this data loss is not synced back to the NextCloud server.

See the following example:

  1. I created a new task named “Test Task” in eM Client, added a first line in the notes field of the task (Text: “1. Änderung/Original (Task created on EmClient 15:49”)) and synced it with NextCloud
  2. I added a new line on top in the notes field (Text: 2. “Änderung (Task changed on CalenGoo 15:5
    0)”) of the new task using CalenGoo
  3. I added another new line on top in the notes field of the new task using eM Client
  4. I added again a new line on top in the notes field of the new task using CalenGoo

When the 4th change ist synced to eM Client as a result the complete notes of the task “Test Task” are suddenly erased in eM Client and the notes field is shown empty.

How come?

Here is a snippet of the log file for the last sync where the notes-sync somehow failed:

BEGIN:VTODO
UID:dd3af8b4-3101-4609-a5ea-6e989b868721
PERCENT-COMPLETE:0
LAST-MODIFIED:20211014T135157Z
DTSTAMP:20211014T135303Z
CREATED:20211014T154941Z
SUMMARY:Test Task
DESCRIPTION:4. Änderung (Task changed on CalenGoo 15:52)\n\n3. Änderung (Ta

sk changed on EmClient 15:51)\n\n2. Änderung (Task changed on CalenGoo 15:5
0)\n\n1. Änderung/ Original (Task created on EmClient 15:49)
CLASS:PUBLIC
X-ALT-DESC;FMTTYPE=text/html:<html><head><style id=“css_styles”>blockquote.
cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-rig
ht:0px; border-left: 1px solid #cccccc }\nblockquote.cite2 {margin-left: 5p
x; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1
px solid #cccccc; margin-top: 3px; padding-top: 0px; }\na img { border: 0px
; }\nli[style=‘text-align: center;’], li[style='text-align: center; '], li[
style=‘text-align: right;’], li[style='text-align: right; '] { list-style-
position: inside;}\nbody { font-family: Segoe UI; font-size: 12pt; } \n.q
uote { margin-left: 1em; margin-right: 1em; border-left: 5px #ebebeb solid;
padding-left: 0.3em; }</style></head><body><div>3. Änderung (Task changed
on EmClient 15:51)</div><div><br></div>2. Änderung (Task changed on CalenGo
o 15:50)<br><br>1. Änderung/ Original (Task created on EmClient 15:49)</bod
y></html>
END:VTODO

I observe the same issue with notes in appointments in my calendar, that I sync via CalDav with my NextCloud Server. As with tasks, notes of appointments seem no longer to be synced correctly when changed frequently.
Actually I guess this is no surprise as both are using the same CalDav interface for synchronization.

I wonder why nobody else seem to have reported this issue so far as combining eM Client with a Nextcloud backend is most probably a very common scenario?
For me personally a proper synchronization between both is key for a future use of eMClient that I am evaluating for about a month now. The alternative would be to continue to use MS Outlook with gSyncIt and Nextcloud. That works properly for Outlook 2007 although it takes quite a long time for synchronization. I guess this is because MS Outlook has actually been designed to work with MS Exchange servers only. So I wanted to move to an alternative that has been designed to work with CalDav/ CardDav based servers naturally.
Isn’t this the case with eM Client?

UPVOTE !
I have exactly the same problems !
I am using emClient 8.2.1659 with Nextcloud 23. I had the same issue with nextcloud 22. Everything works perfekt with android opentasks and other clients but not with emClient and its getting useless again for me.
I did a complet new installation of emClient from scratch without using backups and the issue still persists.

1 Like

Hello,
For the calendar, I use in eM Client the gmail account which contains my calendar. The synchronization is done without CallDAv.
For tasks I use an outlook account and it works perfectly (in my smartphone I see tasks with Microsoft ToDo).
Even the notes can be synchronized with the Outlook account with an addition in the register…
In short, everything works perfectly.

1 Like

IMAP, Contacts via CardDav, Calendar via CalDav works perfect, both are using Nextcloud.
Its only the Notes within Tasks that are not working/synchronised.

OpenTask for Android works fine too.
@ Tenquor, did you fixed it or do you have another solution / programm to use ?

So i made a test:
Creating a task with emclient with 1 comment in the notes field
Open it via Browser in Nextcloud -> 1 comment is there, adding 2 comment in notes field
Open it with emClient -> 1 and 2 comment is there, adding 3 comment
Open it via Browser in Nextcloud -> All 3 comments are there, adding 4 comment -> not shown in emclient. Seems that there a maximum that is synced in the notes field.

1 Like

Today i tried every funktion with Outlook 2016 and CalDav Synchronisier and there are no problems.
But i prefer emClient :frowning:

1 Like

Hi Nitaro!
I reported this issue to the eM Client Support team and also investigated this issue further by myself.

This was the result:
Once eM Client has inserted HTML formatted description data into a calendar object, it expects afterwards all other clients modifiying this object to also provide HTML formatted description data. If any of those is not able to do so, eM Client will not sync anymore the description.

Reason:
To transport a task or an appointment the iCalendar format (vCalendar 2.0) is used in CalDav. For the description of a task or appointment the DESCRIPTION field is the standard field to be used. However, once a line-break is included in the description, eM Client also populates the field “X-ALT-DESC” with an HTML representation of the description outgoing to Nextcloud. Afterwards eM Client expects all other clients that modify the description of this iCalendar object to also update the “X-ALT-DESC” field and not only the DESCRIPTION field. Further updates in the DESCRIPTION field will be ignored by eM-Client. And like that the sync chain is broken once a client modifies the description but does not update “X-ALT-DESC”.

I argued with the support that the iCalendar standard clearly defines “DESCRIPTION” as the only standard field in iCalendar. X-ALT-DESC is only meant as a non-standard experimental parameter (see: iCalendar.org - The iCalendar Standard). Therefore in my opinion eM Client is responsible to process also updates from Nextcloud that come only via the “DESCRIPTION” field.
But the eM Client support guy (Gary Curtin) denied this responsibility and rather sees all other clients responsible to provide HTML descriptions.

As a result the usage of eM Client in any environment with other clients that are not able to support HTML descriptions (like for example already the Nextcloud Calendar App) will cause data inconsistencies. So sad.

Well, that’s not what I said. I proposed that you please ask the NextCloud developers to look at this as the X-ALT-DESC property is widely used but they are ignoring it.

Thanks for this information. Its not good for us customers standing between developers. I opened a issue at the nc calendar developers in january 2022 but get no answer, the issue is still open. I came back to this because i hoped the issue is fixed in V9, but it don´t (i understand that this is not an issue in emclient). Keep in mind that outlook and thunderbird works perfect in this szenario. Since January i use MS Outlook and its very good but i want to use emClient.

@Nitaro: Same with me. I also would rather like to use emClient. However always having to be aware of possible data loss when adding information to a description in emClient is nothing I wanna live with forever. This is too risky in the long run. And yes: Maybe I will also fall back to Outlook and invest here in the newest version (I still used Outlook 2007 before).

However: I have been a Software Developer myself for too long in order to give already up at this point in time. Therefore I’m going to dig into this topic deeper once I find some spare time again.

Here is the answer from the developer:
Reading your thread linked, I find it a bit weird by Gary to shift the responsibilty of supporting the non-standard property X-ALT-DESC used by emClient to other clients such as Tasks. Even though it might be “widely used” (whatever that means), it is still non-standard. So what he says is basically, we do it like this, hence everyone else needs to support it the way we use this property. But that means even a client which follows the CalDAV standard perfectly might still not work with emClient, because they do it differently. This way, basically every client would need a fix to support emClient instead of emClient being fixed. This is not how standards work imho.

The proper solution here in my opinion is that emClient should not expect other clients to write the X-ALT-DESC property and handle this case appropriately.

Sorry if this sounds harsh, but I don’t have the resources to adjust Tasks to every quirk some CalDAV client out there might have. If someone wants to supply a patch for it, I would consider merging it. But honestly, I don’t know how that would work reliably, especially since it is not clear what emClient is even expecting for X-ALT-DESC and if this might not change with future version of it.

@Nitaro: This is the response of the Nextcloud developer you reached out to, right?

I fully agree with this opinion. This is also why I did not reach out to Nextcloud so far, although Gary told me to do so. Because I would have answered just in the same way.

Widely used means that many applications and most servers use this field.

As you added formatting in your text, X-ALT-DESC is used, but NextCloud just ignores this field.

:man_shrugging:

@Tenquor Right, this was the answer from the nc calendar developpers.
@Gary i dont use any format in the text, only “new line” using enter. when most applications and servers using this, why outlook and thunderbird have no problems with nextcloud on this point ? The Nextcloud/owncloud Community is realy big one, there must be more problemes like this when they were ignore important things i guess. On emclient website is an information that emclient works with nextcloud. You should inform the customers that tasks are not fully work.

Yes, so that is not possible using the basic DESCRIPTION field.

If you use line breaks, it will be converted to HTML and therefore ignored by NextCloud as they do not sync the widely used X-ALT-DESC.

@Gary Thanks for all the information and discussion. I don’t think we can persuade you to adjust this. It’s a pity, then I’ll have to give up emclient for good.

But worked in Outlook and Thunderbird with line breaks, all is synced with nextcloud, outlook, aCalendar+, OpenTasks :wink: