Active
Project:
Drupal core
Version:
main
Component:
Admin theme
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
27 Aug 2026 at 08:50 UTC
Updated:
16 Sep 2026 at 15:26 UTC
Jump to comment: Most recent, Most recent file
All entity edit forms have meta data fields in the right sidebar. If the form contains an ajax handler, as soon as that gets used, the form rebuilds, and from then on the sidebar disappears and its content shows at the bottom of the form itself.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | recording-2026-09-16_16.17.09.mp4 | 337.74 KB | jurgenhaas |
Comments
Comment #2
rupeshghar commentedCould you please add steps to reproduce this issue?
Comment #3
jurgenhaasI've attached a recording showing the effect. When using a simple text field with unlimited cardinality, adding more items uses AJAX, and that works well, without an issue. When using an AJAX handler on a button that re-builds the form, it fails. An example for that is an ECA model that provides such functionality, e.g. https://ecaguide.org/library/forms/form_button_with_an_ajax_handler/. Applying that on Drupal 12 currently fails because it requires
text_with_summaryand thearticle_content_typerecipe, both of which have been removed from main.The technical reason for this behavior comes from the hook_form_alter helper function
stickyActionButtonsAndSidebarinDrupal\default_admin\Hook\FormHooks. This builds the sidebar, but it doesn't if$this->isAjax()is true.Why this breaks for the ECA AJAX handler and not for the field widget? It's because the former does a full form rebuild and returns the entire fresh form, while the latter only returns the targeted field widget. We could fix this by not ignoring the form alter for all AJAX calls, but just for
drupal_modalanddrupal_dialog. But I'm certain that will cause other unintended side-effects.So, as this is not an issue in Drupal core alone, only in context of a contrib module that introduces an AJAX handler for a full form refresh, this should probably be lowered in severity, removed from the stable blocker in #3576488: [meta] Admin theme: path to beta, stable, and beyond, and then addressed with full research at some later point.
Comment #4
jurgenhaasClarification following a Slack conversation: removing the
isAjax()handling in default_admin entirely would break lots of other things, media browser in particular, which gets loaded by AJAX into a dialog. So, that's not an option in my view.