Menus that warn before you overwrite

Save a menu that someone changed after you opened it, and Domma CMS now asks first instead of quietly undoing their work.

By Darryl Waterhouse · · 1 min read

Open a menu in the editor, leave the tab for a while, and come back to save. Until now, if anything had changed that menu in the meantime - another tab, a colleague, or a change made on the server - your save quietly put back the version you opened. Their work was gone, and nobody was told.

Now it asks

In Domma CMS 1.16.1, saving a menu that has changed since you opened it shows a warning. You choose:

  • OK saves your version over theirs, as before;
  • Cancel loads the latest version, and offers your changes back as a draft, so you can look at both before deciding.

A normal save, with nothing changed elsewhere, is exactly as quick as it was.

For developers

GET /api/menus/:slug now returns a revision. Send it back on PUT and a save over a newer menu is refused with a 409, leaving the stored menu untouched. Leave it out and the save overwrites, as it always has.