- Issue created by @lauriii
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
I was on the fence about merging this, but ultimately I think it'd be really confusing that this works as expected for
Page
content entities and not forNode
entities 😅 -
wim leers →
committed 6e1308ec on 0.x authored by
lauriii →
Issue #3534040 by lauriii, wim leers: Revert auto-save changes when...
-
wim leers →
committed 6e1308ec on 0.x authored by
lauriii →
- 🇺🇸United States mglaman WI, USA
This breaks the site when you try to revert a node:
See \Drupal\node\Form\NodeRevisionRevertForm
class NodeRevisionRevertForm extends ConfirmFormBase {
It doesn't implement the interface like the hook expects:
/** * Implements hook_form_alter(). */ #[Hook('form_alter')] public function formAlter(array &$form, FormStateInterface $form_state, string $form_id): void { if (str_ends_with($form_id, '_revision_revert') || str_ends_with($form_id, '_revision_revert_confirm')) { assert($form_state->getFormObject() instanceof EntityFormInterface);
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
@lauriii: Sounds like you didn't actually test on the node form? 😇
- Merge request !1247Follow-up #3534040: Revert auto-save changes when reverting a revision' → (Merged) created by penyaskito
- 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺
Follow-up MR !1247.
The problem is not only node revert not implementing EntityFormInterface, but the form structure is different as doesn't use an action submit handler but a form submit handler.
So we want to avoid special-casing xb pages, but we cannot avoid special-casing nodes.
-
wim leers →
committed 9379f74c on 0.x authored by
penyaskito →
Issue #3534040 by lauriii, wim leers, penyaskito, mglaman: Follow-up:...
-
wim leers →
committed 9379f74c on 0.x authored by
penyaskito →
Automatically closed - issue fixed for 2 weeks with no activity.