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

You would need to ask NextCloud as they do not sync the widely used X-ALT-DESC.

Hi Gary!

I tried to live with this issue. However I recently lost again imporant information due to it again. Therefore please let us follow up!

You write:
“new line is not passible using the description field”

But that is not true! Even em-Client add the “\n”-Tag for new lines in the description field - AND adds an HTML version in the X-ALT-DESC:

DESCRIPTION:first line created in em-Client\nsecond line added in em-Client
X-ALT-DESC;FMTTYPE=text/html:<html><head><style id="css_styles">blockquote.
 cite { margin-left: 5px\; margin-right: 0px\; padding-left: 10px\; padding
 -right:0px\; border-left: 1px solid #cccccc }\nblockquote.cite2 {margin-le
 ft: 5px\; margin-right: 0px\; padding-left: 10px\; padding-right:0px\; bor
 der-left: 1px solid #cccccc\; margin-top: 3px\; padding-top: 0px\; }\na im
 g { border: 0px\; }\nli[style='text-align: center\;']\, li[style='text-ali
 gn: center\; ']\, li[style='text-align: right\;']\, li[style='text-align: 
 right\; '] {  list-style-position: inside\;}\nbody { font-family: Segoe UI
 \; font-size: 12pt\;   } \n.quote { margin-left: 1em\; margin-right: 1em\;
  border-left: 5px #ebebeb solid\; padding-left: 0.3em\; }</style></head><b
 ody>first line created in em-Client<div>second line added in em-Client</di

Couldn’t you please just change the logic in eM-Client not to switch to HTML iin a description just because of a line-break??? That would help so much!
Before entering a linebreak you also still stay with plain-text. So couldn’t you just do the same with line-breaks?

And please understand, Gary:

NextCloud is not the problem. It just passes everything through. The problem occurs, when any client, that is not capable of parsing and modifying eM-Clients HTML output provided via X-ALT-DESC, adds additional lines to the description - but does not touch eM-clients X-ALT-DESC HTML data.
Then eM-Client receives from Nextcloud somehting like this:

DESCRIPTION:first line created in em-Client\nsecond line added in em-Client
 \nthird line added in CalenGoo 
X-ALT-DESC;FMTTYPE=text/html:&lt;html&gt;&lt;head&gt;&lt;style id=&quot;css_styles&quot;&gt;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; }&lt;/style&gt;&lt;/head&gt;&lt;body&gt;first line created in em-Client
 &lt;div&gt;second line added in em-Client&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;

As you see: Nextcloud does still provide the X-ALT-DESC data. It has just not been updated by another - non HTML capable - client.
But then eM-Client handles this situation by ignoring both descriptions. Which results first in a blank description field in eM-Client (while still all other clients show the full latest description). And once any field in the task in eM-Client is changed, the description data gets with the next Cal-Dav sync also lost in all other clients.

And what makes this problem even more severe:
As tasks are internally handled as “appointments”, this issue applies also to all appointments and their description in my calendar. And here I faced the biggest data loss: For example when I added important information for a meeting and then, right before the meeting just had to realize that it was all lost.
Believe me, @Gary: This put me already in quite challenging situations.
I just wonder how expensive this could get for any company, using eM-client as an internal collaboration tool?

@Tenquor: Thanks for figure this out. I´m not back to emclient right now, but i want. I am still using Outlook with CalDav Synchronizer, Davx5 on Android, Nextcloud Webapp without problems. For me it is absolutely necessary that tasks are working well.
When this problem is fixed by emclient, i will buy two licenses.

I think I will have to move too. How many people did I refer to EmClient? A lot! I am afraid I will have to substitute this software by another.

When almost all software supports a functionality and not one (in this case EmClient), the faulty behavior is clearly not from the others.

X-ALT-DESC is widely used on servers, but NextCloud do not sync it for some reason. :man_shrugging:

Ok. But other software properly handles it. Why not EmClient?

Gary said Nextcloud dont sync X-ALT-DESC (widely used feature) and the Nextcloud developers said that they are using standards and they won´t fix any deviation from other clients. So, imho, emclient needs to fix it.
Tenquor figured out the following.

We tried to convince Gary but so far without success. He always says nextcloud should fix it.

Here is an excerpt from the calendar specification:

“HTML In Event Descriptions: The original iCalendar standard allowed only plain text as part of an event description. HTML markup, such as font attributes (bold, underline) and layout (div, table) was not allowed in the text description field. First seen in Microsoft Outlook, the X-ALT-DESC parameter provides a method to add HTML to an event description. “X-” fields are allowed for non-standard, experimental parameters. This field has become the method of choice when including HTML in a description. When using HTML, both fields must be included so that iCalendar readers that do not support the X-ALT-DESC field can still read the text version.”

We are not breaking anything. We sync both fields, but unfortunately NextCloud chooses to ignore and not sync or modify the X-ALT-DESC one. All other services are working fine with this, it is just NextCloud that chooses to ignore it.

1 Like

As I already wrote multiple times: Nextcloud does return the “X-ALT-DESC” content. It is in some cases just not updated, when other clients are not supporting HTML markups in descriptions. But it is still returned. The iCalendar specification does (of course) not say that every client needs to support HTML markups.
I just realized that you seem to have changed the behaviour in that way that you do not delete the complete description anymore once the decription field has been updated but the X-ALT-DESC field is still untouched. That behavior is in my opinion much better than before.

They do not update it. They just ignore it. That is the cause of the issue.

OK! You made me took a decision. I will verify all that (what I can).

  • Ensure specification
  • Look and patch NextCloud if needed

I won’t do that now because I am already in another project. But I will.

I hope that if I discover I can’t fix it, but EmClient could, they will.

Sure if you can fix NextCloud that would be great. :+1:

To conclude:
The basic issue here is that there are some clients out there, that support HTML markups in descriptions of tasks and calendar items (like e.g. Thunderbird, Em-Client, Outlook) and others, that don’t (like e.g. various mobile apps or the nextcloud calendar/ task app).
This leads to a compatibility issue once HTML capable clients exchange descriptions in HTML format.

Now I found out that the standard solution for this situation seems to be, that clients that do not support HTML markups delete the HTML representation once the description is updated in these clients - and only update the text only field “description”. (see Calendar ignores ical DESCRIPTION;ALTREP when updating event description · Issue #3863 · nextcloud/calendar · GitHub)

In this case, the sync chain via Nextcloud with Em-Client stays consistent. Cause Em-Client just also clears X-ALT-DESC (as it is no longer provided in the iCalendar item received from Nextcloud) and updates the (text only) description field with the new data.

Therefore I asked the developer of my favorite Android calendar app (CalenGoo) to change it accordingly. This has already been implemented and now it works fine for me again.
I also asked the Nextcloud developer to change it likewise in the Nextcloud calendar app and in the tasks app for X-ALT-DESC. The fix for the calendar app has already been provided. And for the tasks app i just requested it (Fix: Inconsistencies due to ALTREP parameter by max65482 · Pull Request #1916 · nextcloud/tasks · GitHub).

So at least I am (finally) fine now.

@Master_DJon, @Nitaro:
If you still face this issue, you might want to ask the developers of your other calendar apps to implement the same behavior?


Brilliant result @Tenquor

At least it is the best solution I could find given the lack of clear standardization for this situation.

And there are still other open issues, that - however - I am not suffering from yet. So I learned for example that Mozilla Thunderbird uses ALTREP for the HTML representation of the description, which also seems like a valid approach:

In this case the sync chain currently breaks, once an item is modified in Thunderbird and synced to Em-Client again.

However - not my issue yet.
So I am fine now.

Thank you very much for that work and result @Tenquor !

1 Like

I use Nextcloud with Outlook and on my Android acalendar+ and OpenTasks. Im fine with that there are no problems. Im waiting for the Nextcloud Tasks fix and will give emClient a try (again).

Hi Gary!

Another small note from my side:
While creating a new issue for the Nextlcloud Tasks app to delete X-ALT-DESC whenever updating a task description I observed the following:

The CalDav synchronizers for Outlook “gsyncit” and “Cal Dav Synchronizer 4.3” both seem to avoid any data inconsistency issues by apparently just not syncing Outlooks HTML version of the description at all via CalDav and therefore not X-ALT-DESC.

I see the point that it might be handy to have the capability also to share the HTML version for possible other HTML capable clients, like other Em-Client installations connected to the same cloud calendar server. However without the X-ALT-DESC parameter the overall synchronization might get much more robust in heterogeneous system landscapes. So you might wanna consider for example a customization option for this in future!?