SignUp Form block crashes Entity Browser

Created on 29 August 2019, about 6 years ago
Updated 9 July 2025, 2 months ago

Hi everyone,

When creating and placing a Mailchimp SignUp form block in my site, the Entity Browser widget used to Edit images breaks.

Error message:
Error: Call to undefined method Drupal\mailchimp_signup\Form\MailchimpSignupPageForm::getEntity() in entity_browser_form_alter() (line 78 of /var/www/html/web/modules/contrib/entity_browser/entity_browser.module).

Preconditions
Media Bundle with Image field.
Image field uses the "Entity Browser" widget (in Manage form display).
Widget is configured with "Display Edit Button".

Steps:
1) Go to "admin/config/services/mailchimp/signup"
2) Create a Mailchimp Signup form with display mode "Block".
3) Go to Blocks Layout (admin/structure/block) and place the SignUp block.
4) Go to Content -> Media (/admin/content/media)
5) Create a new media with an image field (make sure to add an image).
6) Save media content.
7) Edit media content.
8) In the image field, click on "Edit"

Result:
In the browser console, I get:

Error: Call to undefined method Drupal\mailchimp_signup\Form\MailchimpSignupPageForm::getEntity() in entity_browser_form_alter() (line 78 of /var/www/html/web/modules/contrib/entity_browser/entity_browser.module).

Looking at the code MailchimpSignupPageForm class (mailchimp/modules/mailchimp_signup/src/Form/MailchimpSignupPageForm.php)

I see that MailchimpSignupPageForm is missing the getEntity function.
This should return the entity in $this->signup

Patch Attached

Thanks.

🐛 Bug report
Status

Closed: won't fix

Version

1.0

Component

General

Created by

🇦🇷Argentina sharif.elshobkshy

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.

  • 🇺🇸United States xenophyle

    Thanks for submitting this ticket — and sorry we didn’t get back to you about it sooner. We are cleaning up old issues and issue for old versions and are going to close this one. If this issue is still relevant for you, please re-open it and update the “Version” field, and include any updates to the behavior you are seeing.With a smaller issue queue, we’ll have an easier time getting back to you.

Production build 0.71.5 2024