-
Notifications
You must be signed in to change notification settings - Fork 57
Can't update tasks/events descriptions #5
Comments
Did this issue exist for you in previous versions or is this new in v4.0.0-beta1? |
Hi @advancingu!! Thank you for answering! Yes, it is happening since the update. Tried with all the versions published in this thread with the same result: Ericsson#580 If it helps, I'm using Outlook 365 as server. PS: Another user (@dabhub), confirmed in the same thread that he was suffering the same problem. Best!! |
Hello, The pull request of my ec-4.0 has merged some code which was in a work in progress state, so it's certainly due to that. I've worked a bit last couple days on the edit event/item dialog and on the add attendees dialog. Today I was able to adapt better the edit event/item dialog, but I can't test the edit task, because my calendar is not available in the calendar list when I use the "Add new task". Have you made something special to be able to add task to your Exchange calendar ? FYI, my current work is in my wip-dialogs-event-attendees branch. In fact, the edit attendees dialog is currently not well working and the standard dialog seems to work better. |
Hi @Trim, Thank you for looking into this! What I have is 2 calendars linked to the same account. One is actually the calendar and the other one is linked to the "Tasks" folder when creating it. Like this: Best! |
@Trim Anything we can do to further support you with that? |
Thanks to @smvicente I'm able to use task and currently I see too a bug with the task description. I think I'll be able to fix that point in a near future. |
I love you guys! |
Some news about my progress: I've found that exchangecalendar has its own HTML editor implemented from the Mozilla xul editor. Now, I set the text directly from the event dialog, so we see clearly exceptions when we load the window. The exception is about setting valid XML string into the editor.innerHTML DOM element. My current issue is that, I have this exception some times when I create a new task and some tmes I have no errors. I've tried to replace the ExchangeCalendar own function to create valid XML content from text by an implementation of "htmlspecialchars" PHP like JavaScript implementation, but it wasn't enough. The error seems to come from the "meta" element which is not closed. I've done some tries but I wasn't able to fix this, even without content inside the "body" HTML part. Even if I can fix that to be a bit more stable with tasks edited by our extension, we are dependent to other tasks editor as Outlook: if Outlook make some error in the XML/HTML syntax, we'll got an exception and won't be able to display the content. I think that could be a real issue and we have to find a way to have a more resilient way to (at least) display HTML code. IIRC, Mozilla Firefox is very flexible with websites with bad code and it will be nice to be able to do same thing. Although as we set content of the editor by editing directly the "innerHTML" param we won't be able to be flexible, because the DOM code need to be correct if I think correctly. I don't think having time this weekend to work on it. If I find some time, I'll add comments here. |
Oh, and I've seen that the exchangecalendar event dialog JavaScript code remove completly the Ligthening code which load the dialog. Then it tries to load correctly the window, but it makes it a bit badder. I'm thinking about letting Lightenin to initialize the window object and then use our JavaScript to just add what we need. For the attendees editor, the issue was excatly the same: the exchangecalendar extension have copied the code from Lightening but not completly/correctly and so it wasn't fully functional. As it didn't add Exchange specific features, I've removed this overlay to have back a good attendees dialog. |
Regarding your second comment, I would always rely on Lightning functionality wherever possible vs. reimplemting Lightning functionality a second time. As you found out yourself with the attendees editor, reimplementing something usually leads to more bugs than using base functionality and then addition extra code on top as needed. So, without having looked at the code myself, I would suggest you try out letting Lightning handle as much of the work as possible. |
For the HTML exception, I would also look at having either base Thunderbird or Lightning handle what you need. If that is not possible, could you please post example HTML here which is causing issues? |
Good news: I was able to avoid the HTML parsing exception by using the DOM parser and the XML Serializer for new tasks (thanks to stackoverflow as often !). I'm currently using it to convert text to HTML code (before inserting it to innerHTML). I'm thinking now to use this code directly in the HTML editor to be always sure to insert correctly parsed content. I hope this idea will allow us to simplify the calendar-event-dialog.js code which tries to detect if current content is already HTML or not. Although, it will always convert item content to Gecko formatted HTML code that could be incompatible with exchange. Some bad news is the HTML editor is a bit unstable: some times when I click on the editor, some buttons are in a blocked state (bold, italic, underline) and I can't type text. So it needs some more investigations. |
@Trim Feel free to post a work in progress branch. Kick out as much code as you think makes sense. In my opinion, having a working editor is much more important than preserving fully accurate formatting for a few edge cases. If the editor doesn't work all the time you might have a callback race condition (JS !== PHP ;-) ). |
I had to add (again) the domain for my Exchange user to the plugin settings. After that a sync was fine and my events are there again. |
Hi guys! This starts looking good! Just tried the last beta2, and now I'm able to uptade the description from Thunderbird: But when trying to edit it, 98% of the times I open it for edition, it appears empty: In any case, at least I have the feeling you are going in the right direction! thank you for all the effort! Best. |
Hello, Indeed, I see also this bug in the HTML editor. This issue is strange, because it comes from an exception raised inside the XBL definition which try to set correctly toolbar buttons state. It fails with the numbered/ordered list, even if the task description is empty. |
No, that was another bug which didn't save the content when saving first time a new task. |
Well, I didn't made any progress with this issue. That's really strange because it doesn't appear always and I don't know how to reproduce it. I'm unable to detect from where the issue come. Here are my researches:
I've used the Developer Tools to debug the issue with the "onclick" event handler and I've found that the code wasn't able to create correctly the nsICommandParams in the button state getter (which is essentially just a call to query interfaces/create instance). Without this we can't get correctly state button (and we get the exception). The strange part is that it works well for say 5 buttons and when it tries to read the list format buttons it fails (on I'm afraid I can't do any thing more than suggesting the current workaround: try to open a second time the editor :-( |
Thank you for all the effort Tim! If it helps as a some kind of reference, I'm also using the "Provider for Google Calendar" for exactly the same thing (Calendar + Tasks), but using Google accounts instead. In this case, the addon works well when showing/updating the task's descriptions even with the latest TB and Lightning versions. Just saying in case it helps as a reference for that part or something! |
@Trim For troubleshooting, have you tried making certain steps (e.g. editor initialization) asynchronous using |
I'm using 4.0.0-beta2 with TB 52.1.1, Lightning 5.4, and still having the original problem described by smvicente at the very top of this issue, although I'm concerned with calendar events as opposed to tasks (the title of this issue seems to encompass both). I can successfully create a new calendar event with a description, but when I try to edit the description of that existing calendar event and save it again, it doesn't work; the description reverts back to the one already saved on the server. |
Indeed, there's a known bug in 4.0beta2 if newly created events/tasks. There's a fix merged in the ec-4.0 branch about that. Maybe we should create a 4.0beta3 to have a fixed release. |
According to @Trim, release 4.0.0-beta3 should fix this issue. |
Hi! Thank you for everything! Just wanted to say that the task description issue where an update gets overwritten by the server content is indeed fixed, but when updating the description of a calendar event, the same thing still happens. For me being able to update task's descriptions is more important, but maybe for someone else is the other way around so leaving it here just in case :) |
Can you please open a new issue for the remaining problem? That way it gets easier to tell what still needs fixing than having one big issue for several issues, some of which have already been addressed. Thanks. |
Of course @advancingu ! There is a new one for that in #29 :) |
Since the update to Thunderbird 52.1.1, Lightning 5.4 and EWS Provider v4.0.0-beta1, I can not update task's descriptions from Thunderbird as before, as they get always overwritten with the one in the server right after saving.
Calendar and new tasks creations seems to sync well, but I can't live without been able to modify the descriptions as before :(
I really love this addon! So I can't imagine working without this functionality. I know the effort you guys have to make so I will very grateful if someone can help with this. Anyone else with this problem?
Best.
The text was updated successfully, but these errors were encountered: