Error message
Notice: Use of undefined constant DRUPAL_NO_CACHE - assumed 'DRUPAL_NO_CACHE' in Drupal\mailchimp_signup\Plugin\Derivative\MailchimpSignupSubscribeBlock->getDerivativeDefinitions() (line 31 of modules/mailchimp/modules/mailchimp_signup/src/Plugin/Derivative/MailchimpSignupSubscribeBlock.php).

Comments

Greg Boggs created an issue. See original summary.

  • Greg Boggs committed 5eb20ce on 8.x-1.x
    Issue #2585239 by Greg Boggs: Use of undefined constant DRUPAL_NO_CACHE
    
Greg Boggs’s picture

Issue summary: View changes

I'm unable to modify the max cache time on the block programmatically. So, I've removed the code for now as it's not currently doing anything. More information here: https://gist.github.com/Greg-Boggs/6f17465c3797b8a87e1c

Greg Boggs’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

Badlapje’s picture

I'm not sure why this is marked as fixed when it is not?

I've downloaded the latest dev version a couple days ago, and i get this error trace when i run clear cache on the signup form page (in order to try and get the block that i generated to show up on the block layout page):

Notice: Use of undefined constant DRUPAL_NO_CACHE - assumed 'DRUPAL_NO_CACHE' in Drupal\mailchimp_signup\Plugin\Derivative\MailchimpSignupSubscribeBlock->getDerivativeDefinitions() (line 31 of modules\mailchimp\modules\mailchimp_signup\src\Plugin\Derivative\MailchimpSignupSubscribeBlock.php).
Drupal\mailchimp_signup\Plugin\Derivative\MailchimpSignupSubscribeBlock->getDerivativeDefinitions(Array) (Line: 105)
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array) (Line: 91)
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions() (Line: 268)
Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() (Line: 168)
Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() (Line: 27)
Drupal\Core\Plugin\DefaultPluginManager->getDefinition('help_block') (Line: 20)
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('help_block', Array) (Line: 81)
Drupal\Component\Plugin\PluginManagerBase->createInstance('help_block', Array) (Line: 70)
Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->initializePlugin('help_block') (Line: 62)
Drupal\block\BlockPluginCollection->initializePlugin('help_block') (Line: 85)
Drupal\Component\Plugin\LazyPluginCollection->get('help_block') (Line: 50)
Drupal\block\BlockPluginCollection->get('help_block') (Line: 77)
Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->getConfiguration() (Line: 325)
Drupal\Core\Config\Entity\ConfigEntityBase->preSave(Object) (Line: 439)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 394)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 264)
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 363)
Drupal\Core\Entity\Entity->save() (Line: 642)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 156)
block_rebuild()
call_user_func_array('block_rebuild', Array) (Line: 393)
Drupal\Core\Extension\ModuleHandler->invokeAll('rebuild') (Line: 1134)
drupal_flush_all_caches() (Line: 51)
Drupal\admin_toolbar_tools\Controller\ToolbarController->flushAll()
call_user_func_array(Array, Array) (Line: 128)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 577)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 129)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 102)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 139)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 62)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 62)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 103)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 55)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 637)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Notice: Use of undefined constant DRUPAL_NO_CACHE - assumed 'DRUPAL_NO_CACHE' in Drupal\mailchimp_signup\Plugin\Derivative\MailchimpSignupSubscribeBlock->getDerivativeDefinitions() (line 31 of modules\mailchimp\modules\mailchimp_signup\src\Plugin\Derivative\MailchimpSignupSubscribeBlock.php).
Drupal\mailchimp_signup\Plugin\Derivative\MailchimpSignupSubscribeBlock->getDerivativeDefinitions(Array) (Line: 105)
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array) (Line: 91)
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions() (Line: 268)
Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() (Line: 168)
Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() (Line: 27)
Drupal\Core\Plugin\DefaultPluginManager->getDefinition('system_breadcrumb_block') (Line: 20)
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('system_breadcrumb_block', Array) (Line: 81)
Drupal\Component\Plugin\PluginManagerBase->createInstance('system_breadcrumb_block', Array) (Line: 70)
Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->initializePlugin('system_breadcrumb_block') (Line: 62)
Drupal\block\BlockPluginCollection->initializePlugin('system_breadcrumb_block') (Line: 85)
Drupal\Component\Plugin\LazyPluginCollection->get('system_breadcrumb_block') (Line: 50)
Drupal\block\BlockPluginCollection->get('system_breadcrumb_block') (Line: 140)
Drupal\block\Entity\Block->getPlugin() (Line: 130)
Drupal\block\BlockAccessControlHandler->checkAccess(Object, 'view', Object) (Line: 84)
Drupal\Core\Entity\EntityAccessControlHandler->access(Object, 'view', Object, 1) (Line: 339)
Drupal\Core\Entity\Entity->access('view', NULL, 1) (Line: 61)
Drupal\block\BlockRepository->getVisibleBlocksPerRegion(Array) (Line: 142)
Drupal\block\Plugin\DisplayVariant\BlockPageVariant->build() (Line: 264)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 122)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 95)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object) (Line: 116)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 62)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 62)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 103)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 55)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 637)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
pjcarly’s picture

Status: Closed (fixed) » Active

Issue isn't fixed although it's marked as fixed, updated.

asrob’s picture

idebr’s picture

Status: Active » Fixed

This issue is actually fixed in the 8.x-1.x branch: http://cgit.drupalcode.org/mailchimp/commit/?id=5eb20ce

Status: Fixed » Closed (fixed)

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