Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar ignores ical DESCRIPTION;ALTREP when updating event description #3863

Closed
cm-schl opened this issue Jan 4, 2022 · 12 comments · Fixed by #3918
Closed

Calendar ignores ical DESCRIPTION;ALTREP when updating event description #3863

cm-schl opened this issue Jan 4, 2022 · 12 comments · Fixed by #3918
Labels
4. to release Ready to be released and/or waiting for tests to finish bug calendar-js Bugs in calendar-js

Comments

@cm-schl
Copy link

cm-schl commented Jan 4, 2022

Discussion started at Bugzilla of the Thunderbird Project: 1748002
Preamble: Thunderbird introduced formatting options for event descriptions that are saved via CalDAV as DESCRIPTION;ALTREP. Thunderbird always saves a HTML version (formatted) and a plain text version of the event description like defined in RFC5545.

Steps to reproduce

  1. Use Thunderbird Version 91 to create an event with text in the description field, for example the word "test". The event gets saved correctly on the CalDAV server. The description field of the VEVENT contains:
    DESCRIPTION;ALTREP="data:text/html,%3Cbody%3Etest%3C%2Fbody%3E":test
  2. Open Nextcloud Calendar and edit the event description text to "1111111111111111test". Now the VEVENT on the server looks like this:
    DESCRIPTION;ALTREP="data:text/html,%3Cbody%3Etest%3C%2Fbody%3E":1111111111111111test
  3. Open the event in Thunderbird. The event description only contains "test" because Thunderbird shows the content of ALTREP.

Expected behaviour

After a discussion at bugzilla.mozilla.org (1748002) it seems not correct that Nextcloud updates only the plaintext version of the event description without modifying or deleting the alternative representation under ALTREP. Other CalDAV clients like mobile phone apps seem to delete everything under ALTREP when the plaintext version has been modified by the user.
The problem is that actually the user does not see modifications made via Nextcloud (for example in shared calendars) and therefore overwrites these changes if he tries to update the event description using Thunderbird.

Naturally the best solution would be if Nextcloud Calendar would show the formatted version instead of the plaintext version 😉, but at the moment it seems important that Thunderbird users aren't going to overwrite changes made using Nextcloud.

Actual behaviour

As you can see Nextcloud only updates the plain text description, but the HTML description in ALTREP isn't updated nor deleted.

Calendar app

Calendar app version: 3.0.4

CalDAV-clients used: Thunderbird Lightning, DAVx5, Simple Calendar (Android) for tests

Client configuration

Browser: Firefox 91.4.1

Operating system: Windows 10

Nextcloud Version: 21.0.7

@cm-schl cm-schl added 0. to triage Pending approval or rejection bug labels Jan 4, 2022
@tcitworld tcitworld added 1. to develop Accepted and waiting to be taken care of calendar-js Bugs in calendar-js and removed 0. to triage Pending approval or rejection labels Jan 5, 2022
@tcitworld
Copy link
Member

Thanks for the bug report.

As a sidenote, we will probably use RFC9073's STYLED-DESCRIPTION for rich text formatting if we ever have this feature (see #3234), not ALTREP.

@benbucksch
Copy link

benbucksch commented Jan 7, 2022

The bug comes from the data being inconsistent now. When the description changes, the parameters of the DESCRIPTION property are no longer valid.

The expected minimal behavior is that NextCloud, when writing the DESCRIPTION property, also deletes all parameters of the DESCRIPTION property, which are now outdated.

So, the fix here should be simple: When setting DESCRIPTION, just delete all parameters of DESCRIPTION property, including the ALTREP parameter. That avoids the bug.

@benbucksch
Copy link

  • From Thunderbird, before modification:
    DESCRIPTION;ALTREP="data:text/html,%3Cbody%3Etest%20one%3C%2Fbody%3E":test one
  • After modification in NextCloud - Actual result:
    DESCRIPTION;ALTREP="data:text/html,%3Cbody%3Etest%20one%3C%2Fbody%3E":test two
  • After modification in NextCloud - Expected result:
    DESCRIPTION:test two

Given that the property parameters describe the property (not the whole calendar item, just this property), and the property changed, it's reasonable to assume that the parameters which described the old property are no longer valid.

@Gorendal
Copy link

The same issue comes with X-ALT-DESC, which is used by other clients like Outlook and eM-Client to add an HTML representation of the description value. Would it be possible to delete the field, too, once the description is changed in Nextlcoud?

@max65482
Copy link
Contributor

This should be fixed in #3924. All parameters should be deleted upon modification of the description. Can you give exact reproduction steps or excerpts from ics files?

@benbucksch
Copy link

@Gorendal Could you file a new ticket about that, and mention the new ticket number here?

While it's the same symptom, the cause is different, because ALTREP is a "parameter" of the modified DESCRIPTION property, whereas X-ALT-DESC is a completely different property. It needs a different fix.

@st3iny
Copy link
Member

st3iny commented Nov 18, 2022

@Gorendal @benbucksch Please refer to #4744.

@Gorendal
Copy link

@st3iny @benbucksch is there still something to be done from my side?
Sorry, I am new to GitHub. So I haven't got the complete picture how this all works yet.

@benbucksch
Copy link

benbucksch commented Dec 11, 2022

@Gorendal Possibly in reaction to your comment, @st3iny filed a new ticket #4744, which captures the problem that you raised. (It is a different problem than this ticket here, and this ticker here is already fixed, therefore it needed a new ticket.)

Good news is that #4744 was already fixed by @st3iny, so the problem you mentioned should be fixed now. It was even backported to NextCloud 3.5.x and 4.1.x.

You can test the next NextCloud release, whether it fixes your issue. Otherwise, there's nothing more to do. Any comments should be posted to #4744.

@Gorendal
Copy link

@benbucksch Sounds great. I am happy to test it. I just checked my Nextlcloud instance and it anyway offers an update to 25.0.2. So my current Calendar version is 4.1.0.

However:
The behaviour still seems to stay the same after changing the description of an appointment in Nextcloud. The connected client "eM-Client" still logs the X-ALT-DESC field in the following VEVENT received from Nextcloud:

SUMMARY:Test Meeting 1
DESCRIPTION:first line added in eM-Client\nsecond line added in eM-Client\n
third line added in Nextcloud\nfourth line added in Nextcloud
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-left
: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border
-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }\na img {
border: 0px; }\nli[style='text-align: center;'], li[style='text-align: c
enter; '], 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><body>first
line added in eM-Client<div>second line added in eM-Client</div></body></h
tml>

I wonder if I can check somehow the Nextcloud files on my server, if st3iny's fix is already available?
I tried to locate the modified file "src/store/calendarObjectInstance.js" on my server but were not successful.
Any idea?

@benbucksch
Copy link

benbucksch commented Dec 12, 2022

@Gorendal As mentioned above, please make your comments at #4744, not here, as it's offtopic here. Thank you. Regarding installing the fix, you could ask on the help forums.

@st3iny
Copy link
Member

st3iny commented Dec 13, 2022

@Gorendal The fix is yet to be released. It will most likely be included in v4.1.1 and any later version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug calendar-js Bugs in calendar-js
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants