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 using this module I get the following errors:
Notice: Use of undefined constant BLOCK_VISIBILITY_LISTED - assumed 'BLOCK_VISIBILITY_LISTED' in advagg_mod_inline_page() (line 914 of modules/contrib/advagg/advagg_mod/advagg_mod.module).
Notice: Use of undefined constant BLOCK_VISIBILITY_LISTED - assumed 'BLOCK_VISIBILITY_LISTED' in advagg_mod_match_path() (line 1003 of modules/contrib/advagg/advagg_mod/advagg_mod.module).
From what I can see that constant is defined in the block module, which I do not have enabled. Does this module require Block?
If I add the following line in advagg_mod.module the errors dissappear:
if (!defined('BLOCK_VISIBILITY_LISTED')) define('BLOCK_VISIBILITY_LISTED', 1);
Comment | File | Size | Author |
---|---|---|---|
#6 | advagg-2407769-6-breakaway-from-block-constants.patch | 3.22 KB | mikeytown2 |
#1 | advagg-define-block-2407769-1.patch | 663 bytes | emek |
Comments
Comment #1
emek CreditAttribution: emek commentedI have made a patch which defines the variables from the Block module.
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedThanks for the patch! It has been committed.
Comment #4
ciss CreditAttribution: ciss commentedIs it really such a great idea to define constants owned by another module? Wouldn't it be safer to prefix the constants and then use the prefixed versions?
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedGood point; I'll fix this.
Comment #6
mikeytown2 CreditAttribution: mikeytown2 commented