mendixlabs/CalendarWidget

Latest version of the widget generates errors on create and click actions

mkumpf opened this issue · 8 comments

See this forum thread: https://forum.mendixcloud.com/link/questions/88311

Background:
Calendar embedded in a dataview of a context object (example: Employees --> Events)
Calendar configured to set reference when a new Event is created

Issues:
when clicking on a current event, errors are generated in the Modeler
when clicking on the calendar to create a new event, errors are generated in the browser console

@JelteMX any update on a fix for this?

My appologies, I have overlooked this issue. I did do a small bugfix which seems to be related to this. Can you confirm this issue is still applicable in the latest version? If so, I am going to need a test-project to reproduce this

Hi @JelteMX, yes, the issue is still applicable in v5.3.4. @fotherga and I can get you a test project today or early next week. What is the purpose of event.resourceId? There's a line in _setResourceReference (L523) that is improperly setting(/adding?) the value of this reference on the event entity to itself, instead of to the parent context object.

Hi @JelteMX - I just emailed you a project and video on how to reproduce. Let me know if you need anything else.

I haven't checked the test-project @fotherga, will do today. In the meantime, I have fixed a new version: this one. Could you check this for me? I am working on a high level fix for a client which has a similar issue.

@cdcharlebois the purpose for _setResourceReference is to set the reference in relation to a resource. This should only be used in the Scheduler. I have fixed the widget so the 'onClick' does not try to set the reference in the normal calendar.

Hey @JelteMX - I just did a couple of quick tests, and that version does resolve the issue we were experiencing. Could you let me know when this version is complete? I'll update my project then. Thanks!

@fotherga I will check today with the client that has this same problem. On positive feedback I'll release a new version and close this issue. Will get back to you

Version 5.3.5 has been released and updated in the AppStore, containing this fix. Closing the issue.