Mx 7.23.0 - Error: Trying to unsubscribe using an invalid subscription handle
johanflikweert opened this issue · comments
Context: I'm running the widget in a non-persistent entity (list view) and it referrs to a persistent entity.
The following error occurs:
autoCompleteForMendix1: Error while applying context Error: Trying to unsubscribe using an invalid subscription handle
I have the same issue. It seems to occur when the widget lives inside a list view. This list view contains a button with a pop up window behind it, which contains the same widget with the same reference. On pop up close with a refresh, the error occurs.
Plz find attached the reproduction project.
AutoCompleteWidgetBug.zip
In the known issues, this is described (https://docs.mendix.com/releasenotes/desktop-modeler/7.23#7231):
Custom widgets that subscribe using the this.subscribe function and unsubscribe using mx.data.unsubscribe get an error when calling mx.data.unsubscribe. (Tickets 79881, 80075, 80078, 80174)
Workaround: Call this.unsubscribe instead (which is the recommended way to unsubscribe).
I have now replaced mx.data.unsubscribe with this.unsubscribe in version 5 of the widget