I just encountered a bug in the Dato UI that caused me to lose some data. Iāll describe the steps I took as best I can. Iām not comfortable attempting to reproduce the issue myself as it put my project in a bad state for a bit, so please forgive the vague report.
I have a custom block type A thatās enabled in two structured text fields. There are a couple dozen instances of this block type across a number of items. My goal was to add an additional custom block type B, which was to be similar to A, but with fewer fields.
Steps:
- I opened A in the blocks library and used the āDuplicateā menu option to create the new block type B.
- I then deleted one of the fields that was not needed for B.
- Dato displayed a modal with a progress spinner that never completed even after waiting several minutes. There was no way to dismiss the modal.
- I refreshed the page, which showed that the field had been successfully removed.
- At this point I realized that I had deleted the field on the original block, A, instead of the new block B. I am unsure if this was an error on my part, or if the Dato UI was showing me the wrong type following the duplication action. Regardless, Dato should have warned me about the data loss that this caused on the instances of this block.
- I manually restored the field, moving the instances into an invalid state, and then manually re-populated the fields to get back into a good state.
- I then ensured I was viewing the new block type B before deleting the unneeded field. This time, Dato did warn me that data loss would occur, despite the page indicating that the block type was not used in any fields.
- At this point I became unsure if the Duplicate action had left the new type somehow linked in a way that I didnāt understand, so I opted to delete the new type entirely and manually create a new block type instead of starting from a duplicate.
Itād be great if a dev could check out this workflow and verify that the mistake described in step 5 was mine and not the systemās. In addition, it seems like Dato might have an issue with detecting when data loss could occur and displaying the proper warning, as well as a hanging loading indicator when the field was deleted.