After an error it’s possible to get trapped in an unrecoverable error state

Created on 27 February 2025, 10 days ago

Overview

It’s possible to get trapped in an unrecoverable error state in the XB UI.

Adding modifying the layoutModel in such a way that the POST to /xb/api/layout/{entitytype}/{entityId} returns an error, we show a modal alert.

Clicking Try again and thus re-requesting the preview endpoint won’t fix it, the issue is server side.
Refreshing the page won’t fix it - the erroring layout/model is now autosaved which means that refreshing the page just brings it back.
If the user was able to press Undo and THEN re-request the preview endpoint they might get unstuck, but if they refresh the page, they would lose the undo history and become stuck again.
The user can’t access the preview UI/layers panel to remove the offending component themself because the alert is modal.
You can’t remove pending autosaves from the Publish/Review button (I don’t know if you will be able to do this in future?).

Proposed resolution

Obviously in an ideal world we'd fix the causes of the crash! But some ideas

  1. Add an undo call to the callback function the Try again button calls.
  2. Display the error in a non-modal way.
  3. If the POST to /xb/api/layout/{entitytype}/{entityId} doesn't successfully return preview markup due to an error, then don't create an auto-save so at least the user can reload the page.

User interface changes

🐛 Bug report
Status

Active

Version

0.0

Component

Page builder

Created by

🇬🇧United Kingdom jessebaker

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024