Problem/Motivation
When a #ajax request fails, core's Drupal.AjaxError writes "Oops, something went wrong. Check your browser's developer console for more details." into the page's [data-drupal-messages] region. In expanded mode the builder covers the whole viewport, so the message is never seen and the action just seems to do nothing.
Steps to reproduce
- Open a builder and switch to expanded mode.
- Trigger a failing
#ajaxrequest from the Config panel, for example the one from #3623496: Config form: a rebuild carrying only its button replaces the source settings. - No message appears; it is in the page's messages region, behind the builder.
Proposed resolution
Show Ajax errors in the builder's own toast stack, like server errors from RenderableBuilderTrait::buildError().
Core only creates Drupal.AjaxError.messages when none is set, so the builder sets its own, rendering the same alert into its stack, where its live region announces it.
A Playwright test expands the builder, raises the error and checks the toast is visible and not covered.
Issue fork display_builder-3623534
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mogtofu33 commented