Opening the edit form from an entity reference field throws an error for some entity types

Created on 10 April 2017, over 8 years ago
Updated 19 August 2025, 4 days ago

This happens for some entity types, like user or taxonomy term, that don't have the 'edit' operation defined.

Example use case:
If you set up a entity reference field to select user entities and create an entity browser, you also will get an edit button to edit the selected user.

If you click on the edit button, you will get this error:

Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException: The "user" entity type did not specify a "edit" form class. in Drupal\Core\Entity\EntityTypeManager->getFormObject() (Zeile 184 in web/core/lib/Drupal/Core/Entity/EntityTypeManager.php).

The form for user is called "default" and not "edit". I guess the code in the controller is mainly made for nodes.

🐛 Bug report
Status

Needs review

Version

2.0

Component

Widget plugins

Created by

🇨🇭Switzerland ayalon

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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