Object cannot be updated (Ratings widget, very strange)
Hi guys, I got stuck with the ratings widget: each time when I try to rate a review by selecting a star I got this error most of the time (very few time it does not give the error, not reproduced yet): "Object of type 'Reviews.Vote' with guid '36028797018967170' cannot be updated, as it does not exist anymore" The scenario is like that an applicant place an apply and after that I send him a deeplink to fill in a review about the apply proces. The deeplink everything goes well, but the rating itself (selecting a star) gives the error. According to the - very basic documentation of the rating widget- i have this domain model: I see that the widget is making a new Vote entity (Guid in the error is one higher than in MF made before). I also tried without creating a Vote entity in the MF before, but still same error. Does anyone has an idea? Update: When I review in Firefox and begin with voting it goes well, but when I fill in the description before the vote itself it gives error. In Chrome no matter which order it gives always the error.. Anyone an idea?
I tried to reproduce with your project (had to make some model changes to prevent the errors you got) and it seems that the "Rating widget" always creates a new "Review"-object when you choose a rating for the first time (dropping the reviewer instead of just commiting it).
It's not a sollution but maybe this wil help you a bit further...I will try another time from scratch.
Updated Model MyFirstModule:
Updated Widget settings:
I have checked the widget and there seems to be an issue, which might be related to your issue. Keep an eye on https://github.com/mendix/Ratings/issues/3. Working on a fix tomorrow. It seems we have overlooked one of the deprecations. Because this is Community supported content, it's not actively maintained. Yet, we value the code we post on Github and the quality of the widgets, so I'll look into a fix tomorrow.