EntityRouteEnhancer and HtmlEntityFormController should document requirements for the _entity_form property

Created on 25 March 2021, about 4 years ago
Updated 1 October 2023, over 1 year ago

Problem/Motivation

A form used for the _entity_form route property must inherit from EntityForm, not FormBase.

This should be documented.

Steps to reproduce

Try it.
You get:

Error: Call to undefined method MyEntityForm::setModuleHandler() in Drupal\Core\Entity\EntityTypeManager->getFormObject() (line 230 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).

Drupal\Core\Entity\EntityTypeManager->getFormObject('group', 'member-bulk-edit') (Line: 82)
Drupal\Core\Entity\HtmlEntityFormController->getFormObject(Object, 'group.member-bulk-edit.default') (Line: 76)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

๐Ÿ› Bug report
Status

Active

Version

11.0 ๐Ÿ”ฅ

Component
Documentationย  โ†’

Last updated about 9 hours ago

No maintainer
Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom joachim

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024