I made Update from Drupal 8 to 9.0.8
Everything seemed to be in order.
I can use a view to edit fields in frontend with "Content: Form field: Text" field
But in the moment I change something in this view in backend, I can't save the view.

Error is:

The website encountered an unexpected error. Please try again later.
Error: Call to undefined method Drupal\views_entity_form_field\Plugin\views\field\EntityFormField::getEntityTypeManager() in Drupal\views_entity_form_field\Plugin\views\field\EntityFormField->getEntityTranslationRenderer() (line 52 of core\modules\views\src\Entity\Render\EntityTranslationRenderTrait.php).

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

Lissy created an issue. See original summary.

lissy’s picture

Issue summary: View changes
lissy’s picture

Issue summary: View changes
lissy’s picture

Issue summary: View changes
lissy’s picture

I have created a new installation with only this module, where I can reproduce the error:

  • composer create-project drupal/recommended-project:9.0.8 patz/to/drupal "
  • http://dummy.localhost/core/install.php
  • composer require drupal/views_entity_form_field:1.0-beta8
  • enable views_entity_form_field
  • http://dummy.localhost/update.php
  • http://dummy.localhost/admin/structure/views/add
  • Filter criteria.Content: Content type 😊 Basic page)
  • Show:Fields
  • Add fields:
    Content: Form field: Body
  • Save
    Error: Call to undefined method Drupal\views_entity_form_field\Plugin\views\field\EntityFormField::getEntityTypeManager() in Drupal\views_entity_form_field\Plugin\views\field\EntityFormField->getEntityTranslationRenderer() (line 52 of C:\wwwroot\dummy\web\core\modules\views\src\Entity\Render\EntityTranslationRenderTrait.php)

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

jcandan’s picture

Seems this bug was introduced by Drupal 9 deprecated code report.

jcandan’s picture

Component: Miscellaneous » Code
Assigned: lissy » Unassigned
Priority: Normal » Critical
Status: Active » Needs review
jcandan’s picture

Version: 8.x-1.0-beta8 » 8.x-1.x-dev
jcandan’s picture

Version: 8.x-1.x-dev » 8.x-1.0-beta8
oo0shiny’s picture

Status: Needs review » Reviewed & tested by the community

I've tested this on a Drupal 9.0.7 view where I was having this same problem (same error on saving the view). Applied these changes as a patch and the view now saves without error. Moving to RTBC.

lissy’s picture

Thanks oo0shiny,
Where can I find the patch?

ledjerdemain’s picture

Hey Lissy,
Go got to go to this file. I manually changed the lines. But It guess it could be made into patch. (And It worked BTW)
https://git.drupalcode.org/project/views_entity_form_field/-/commit/03e9...

cprofessionals’s picture

#14 Resolved the issue for me! Thank you

miedward’s picture

This patch should replicate the above snip if you don't want to use dev branch

miedward’s picture

miedward’s picture

This patch should replicate the checkin above but with fewer vim errors

lissy’s picture

Thankyou very much, miedward.
It's such a helpfull module.

  • b03338d committed on 8.x-1.x
    Issue #3183476 by miedward, jcandan, Lissy, oo0shiny, ledjerdemain,...
grathbone’s picture

Status: Reviewed & tested by the community » Fixed

Hey, everyone. This has been merged in and released under Beta 9.

Wanted to say thanks to everyone for testing it. I chose to merge in the PR instead of doing a manual patch and commit and in doing so it seems I lost the ability to give credit via commit message, so it didn't track credit. I did a blank file change to try to give credit afterward.

Status: Fixed » Closed (fixed)

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