Call to undefined method ...::getEntity()

Created on 23 October 2024, about 2 months ago

Problem/Motivation

We "randomly" encounter the following error:
Error: Call to undefined method ...::getEntity() in gin_everywhere_form_alter() (line 77 of modules/contrib/gin_everywhere/gin_everywhere.module).

The class on which ::getEntity() is called varies, it seems like it's module that extend forms in a generic way.

Steps to reproduce

Last encountered we dealing with ai_chatbot.
I'm not entirely sure what the required steps are to reliably trigger the error.

Proposed resolution

More precise check if the form is actually an instance of \Drupal\Core\Entity\EntityForm which has the ::getEntity() method.

Remaining tasks

  1. Provide fix
  2. Review

User interface changes

none

API changes

none

Data model changes

none

🐛 Bug report
Status

Needs work

Version

1.1

Component

Code

Created by

🇨🇭Switzerland das-peter

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024