Collection node does not sync

I’m experiencing a weird model/collection behavior. I’m not sure if it’s something that came to be with the latest update or I’m only noticing it now or that I’m on a weird wifi connection…

  • I’m running the collections tutorial, and the data just doesn’t sync between the NOODL window and a preview on a browser window. More specifically the collection Notes only sync’s when clicking the ‘save’ button. Clicking ‘delete’ (the item) does not update the Notes collection on the client preview window (in a browser). It does delete the note from the Noodl window.

Which is really odd… I could have sworn that it has worked before.

If I create an ‘event’ node with an item ID to delete from the the ‘Note item’ when ‘tapping’ (delete) a note and send it to the ‘root’, then attach the received event to the ‘root’ collection, the update sync’s on all the windows. So It’s something with being in a ‘deeper node level’? I’m not sure how to explain this. I could record a short video if needed.

Steps To Reproduce
Collections example.

Expected Result
Add a note adds new note and sync’s across all client windows… Delete note, deletes note across all clients. (Sync persistence on collection node)

Actual Result
Add a note adds new note and sync’s across all client windows. Delete note, deletes note only in the client window which the note was deleted from.

Hi @Regi

I tried completing the lesson and it worked fine here. Please check that the collection in the Note Item is in Sync mode and that it has the same Id e.g. Notes (it is case sensitive).

If you can’t figure it out, would you mind sending me the project? You can find it if you click the project settings button on top of the components panel and then the project folder icon.

Many thanks for helping us find bugs!

Thanks for helping out @mikaeltellhed

Here’s a short video showing the discrepancy. And the file.
I’ve trimmed it down a bit in trying to find the problem.
But perhaps it’s also something about browsers not sync’ing properly. As you can see on the windows machine as I drag the ‘priority’ bar the data updates for some reason.

I reviewed the project and it is very much a bug, many thanks for finding it. The problem is that since there is no animation when the item is removed, the Collection Node where the Remove is performed is deleted before it has a chance to persist the data. It will be fixed in the next release!

The trick to solving it temporarily is to either add an animation when the item is removed (as shown in the lesson) or a little hack if you don’t want an animation is to just add a Boolean node as shown below:


Workaround works great, thanks!