InvalidArgumentException loading nonexistent entity_view_display entity

Created on 1 November 2022, about 2 years ago
Updated 17 February 2024, 10 months ago

The default view mode in email_contact is "full", but the default view modes for a node bundle are "default" and "teaser". When trying to display the contact form, this results in

InvalidArgumentException: Parameters passed to 'email_contact.form' route are not defining a valid display or field. in Drupal\email_contact\Controller\ContactController->getTitle() (line 91 of modules/contrib/email_contact/src/Controller/ContactController.php).

because "node.mybundle.full" does not exist.

If I add the email field in contact link mode to the node teaser, that doesn't work either. ContactController::getTitle() still gets the default view mode of "full" from - I think? - the routing defaults.

It seems like using "default" as the default would be reasonable.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States brad.bulger

Live updates comments and jobs are added and updated live.
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