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.
- 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.