Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I on campaing view page I got these PHP notices
Notice: Undefined index: weight in Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple() (line 270 of core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php). Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 303) Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 246) Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 203) Drupal\Core\Entity\EntityViewBuilder->build(Array) call_user_func(Array, Array) (Line: 381) Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195) Drupal\Core\Render\Renderer->render(Array, ) (Line: 226) Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 574) Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227) Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117) Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90) Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object) (Line: 111) Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 149) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 98) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 77) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23) Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 628) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Notice: Undefined index: weight in Drupal\Core\Entity\EntityViewBuilder->buildMultiple() (line 263 of core/lib/Drupal/Core/Entity/EntityViewBuilder.php). Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 203) Drupal\Core\Entity\EntityViewBuilder->build(Array) call_user_func(Array, Array) (Line: 381) Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195) Drupal\Core\Render\Renderer->render(Array, ) (Line: 226) Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 574) Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227) Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117) Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90) Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object) (Line: 111) Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 149) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 98) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 77) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23) Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 628) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Comment | File | Size | Author |
---|---|---|---|
#4 | mailchimp-undefined_index_weight-2778183-3.patch | 605 bytes | vollepeer |
Comments
Comment #2
Tritof CreditAttribution: Tritof commentedHey, I have the same issue here. Not having the skills yet to help with maintaining the module, I can only suggest that I found also this issue related to a close error message: https://www.drupal.org/node/2860489
Where the guys fixed the issue by adding
'weight' => 0,
in the execution of the functionsetDisplayOptions
In my case the Mailchimp module is absolutely not usable from here, so as far as it is not fixed, I can't use it on websites.
Comment #3
vollepeer CreditAttribution: vollepeer at AmeXio commentedLike mentioned in comment #2, appending a weight in the arguments for the setDisplayOptions method in MailchimpCampaign.php solves the issue. Patch is attached.
Comment #4
vollepeer CreditAttribution: vollepeer at AmeXio commentedComment #5
My-Websitebuilder CreditAttribution: My-Websitebuilder as a volunteer commentedThanks for the review and it's working fine
Comment #7
Greg Boggs