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

Command icon 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

mstrelan created an issue. See original summary.

acbramley made their first commit to this issue’s fork.

acbramley’s picture

Issue summary: View changes
acbramley’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
smustgrave’s picture

Status: Needs review » Needs work

Appears to be 1 open thread already from @acbramley

acbramley’s picture

Status: Needs work » Needs review

That's more informative than needing feedback. For a future followup.

smustgrave’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Scratching 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

  • catch committed daca1600 on 11.x
    Issue #3461700 by mstrelan, acbramley: Allow vocabulary overview form...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

quietone’s picture

Publish cr

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

anybody’s picture

Looks 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

  • tvi
  • simplify
  • rabbit_hole
  • taxonomy_unique
  • ...?

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.