I had a Mailchimp signup form as a block and a page and everything was running normally. I created a new list on mailchimp, refreshed the lists in Drupal and then created a new signup form as a page and a block. This error comes up when I access the form page or whatever page the block is placed on. The signup form appears to work correctly, I can still add myself to the list, but this error shows up when the page loads. The code below was copied from my log messages. It appears to happen when I add a second signup form in Drupal because I tried creating a signup form with a different list and the same result happened.

When I look at the log after loading a page with two different signup form block on it, the error shows up twice, I thought it was because there were 2 forms on the page but actually there are 3 so I'm not sure why there are only 2 errors. This error only seems to show up when I have 2 signup forms created in the Mailchimp module. When I delete the second form and go back to the page with the block added to it, the error is gone.

Edit: This does happen, at least some of the time. The user is getting subscribed but I have seen the log notification. Not sure why I didn't see it previously
I also noticed that I was not getting a log message notifying me that someone was subscribed to the list. I don't know what is going on to cause that but I assume that this error is somehow causing that notification to not go through. The user still sees the confirmation message as normal but there isn't a log message confirming it.

Here is the location listed in the log message:http://mysite/support_signup?q=support_signup

Notice: Undefined property: stdClass::$size in mailchimp_insert_drupal_form_tag() (line 1236 of /code/modules/mailchimp/mailchimp.module) #0 /code/core/includes/bootstrap.inc(566): _drupal_error_handler_real(8, 'Undefined prope...', '/code/modules/m...', 1236, Array) #1 /code/modules/mailchimp/mailchimp.module(1236): _drupal_error_handler(8, 'Undefined prope...', '/code/modules/m...', 1236, Array) #2 /code/modules/mailchimp/modules/mailchimp_signup/src/Form/MailchimpSignupPageForm.php(124): mailchimp_insert_drupal_form_tag(Object(stdClass)) #3 [internal function]: Drupal\mailchimp_signup\Form\MailchimpSignupPageForm->buildForm(Array, Object(Drupal\Core\Form\FormState)) #4 /code/core/lib/Drupal/Core/Form/FormBuilder.php(514): call_user_func_array(Array, Array) #5 /code/core/lib/Drupal/Core/Form/FormBuilder.php(271): Drupal\Core\Form\FormBuilder->retrieveForm('mailchimp_signu...', Object(Drupal\Core\Form\FormState)) #6 /code/core/lib/Drupal/Core/Form/FormBuilder.php(212): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\mailchimp_signup\Form\MailchimpSignupPageForm), Object(Drupal\Core\Form\FormState)) #7 /code/modules/mailchimp/modules/mailchimp_signup/src/Controller/MailchimpSignupController.php(33): Drupal\Core\Form\FormBuilder->getForm(Object(Drupal\mailchimp_signup\Form\MailchimpSignupPageForm)) #8 [internal function]: Drupal\mailchimp_signup\Controller\MailchimpSignupController->page('signup_support') #9 /code/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #10 /code/core/lib/Drupal/Core/Render/Renderer.php(576): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #11 /code/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #12 /code/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #13 [internal function]: Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #14 /code/vendor/symfony/http-kernel/HttpKernel.php(153): call_user_func_array(Object(Closure), Array) #15 /code/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #16 /code/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /code/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /code/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /code/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /code/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /code/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /code/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /code/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /code/core/lib/Drupal/Core/DrupalKernel.php(657): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #25 /code/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #26 {main}.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rlahoda created an issue. See original summary.

rlahoda’s picture

Issue summary: View changes
rlahoda’s picture

Issue summary: View changes
dddbbb’s picture

Version: 8.x-1.5 » 8.x-1.6

I just got this same error with version 8.x-1.6 of the module. 2 notices appeared after creating my very first signup form and then visiting the form's page.

Drupal 8.5.0
PHP 7.1.15

dddbbb’s picture

This patch suppresses the notice by commenting out line 1236 of mailchimp.module. It seems to work OK, text fields still get a size attribute set, it just appears to use 60 (which I'm guessing is the form API default) rather than 25 which is what the module appears to be trying to set.

It's a workaround, not a solution!

MiroslavBanov’s picture

Version: 8.x-1.6 » 8.x-1.x-dev
Status: Active » Needs review
FileSize
526 bytes

I also saw the notice. Uploading an alternative patch, which looks more like a solution that might be accepted.

MiroslavBanov’s picture

I reproduced it quite easily on Birthday field of the default Mailchimp form.

dddbbb’s picture

Patch in #6 works fine for me, thanks.

dddbbb’s picture

samuel.mortenson’s picture

Is this a problem that always occurs, or are there cases where the size option is set and this notice is not thrown?

  • MiroslavBanov authored 36848bd on 8.x-1.x
    Issue #2936099 by danbohea, MiroslavBanov: Notice: Undefined property:...
samuel.mortenson’s picture

Status: Needs review » Fixed

Committing as-is as it seems like a current problem.

Status: Fixed » Closed (fixed)

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