Problem/Motivation
This could possibly be classified as a bug report. The entity annotation for the Vocabulary class sets the overview form to Drupal\taxonomy\Form\OverviewTerms. Ideally this can be overridden by calling \Drupal\Core\Entity\EntityType::setFormClass from hook_entity_type_alter, however it has no effect since VocabularyRouteProvider::getOverviewPageRoute hardcodes the form class.
Steps to reproduce
Proposed resolution
Update \Drupal\taxonomy\Entity\Routing\VocabularyRouteProvider::getOverviewPageRoute to use _entity_form
Update OverviewTerms to extend EntityForm
Remaining tasks
Test coverage See https://git.drupalcode.org/issue/drupal-3461700/-/jobs/6675714
User interface changes
None
API changes
Drupal\taxonomy\Form\OverviewTerms now extends Drupal\Core\Entity\EntityForm
This is marked as internal so no BC concerns here.
Data model changes
None
Release notes snippet
None
Issue fork drupal-3461700
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:
- 3461700-vocabulary-overview-form
changes, plain diff MR !8782
Comments
Comment #3
mstrelan commentedComment #5
acbramley commentedComment #6
acbramley commentedComment #7
smustgrave commentedAppears to be 1 open thread already from @acbramley
Comment #8
acbramley commentedThat's more informative than needing feedback. For a future followup.
Comment #9
smustgrave commentedScratching out test coverage as it was covered here https://git.drupalcode.org/issue/drupal-3461700/-/jobs/6675714
Opened #3548964: Replace uses of $form_state in OverviewTerms as a postponed follow up on this one landing.
Rest of the feedback appears to be addressed
Comment #11
catchCommitted/pushed to 11.x, thanks!
Comment #14
quietone commentedPublish cr
Comment #16
anybodyLooks like this caused a regression with contrib modules?
See #3564792: Changes to the order of taxonomy elements are not saved. - it seems that submit callbacks in modules like
don't work like before any more and break the taxonomy term overview "Save" call!
Any ideas about the root cause?
As result
OverviewTerms::submitForm()is not being called anymore, if a submit callback was added by a contrib module.