Whenever you clear cache, you get this error:

Notice: Use of undefined constant DRUPAL_NO_CACHE - assumed 'DRUPAL_NO_CACHE' in Drupal\cleverreach\Plugin\Derivative\CleverreachBlock->getDerivativeDefinitions() (line 50 of modules\contrib\cleverreach\src\Plugin\Derivative\CleverreachBlock.php). 

There are some articles on the net that show to use it for D8, but there is no more DRUPAL_NO_CACHE constant in D8 in common.inc.

So this line of code does not do anything, except cause an error.

As a quickfix, I commented it out locally.

If we do not want to cache this block, then another solution will be needed, probably where we generate the render-arrays.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hoporr created an issue. See original summary.

Znak’s picture

Status: Active » Needs review
FileSize
1.39 KB
snufkin’s picture

I would +1 on that. Looking at Mailchimp they seem to solve it similarly at #2585239: Use of undefined constant DRUPAL_NO_CACHE, code at http://cgit.drupalcode.org/mailchimp/tree/modules/mailchimp_signup/src/P....

I've updated the patch to remove the commented out code piece as well, but the main commit credit is due to Znak for pointing out the issue and rolling a patch.

Anybody’s picture

Status: Needs review » Reviewed & tested by the community

Patch works well and fixes the problem. RTBC.

rgpublic’s picture

Is there still a maintainer of this module who could commit this?