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);

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

emek’s picture

I have made a patch which defines the variables from the Block module.

mikeytown2’s picture

Status: Active » Fixed

Thanks for the patch! It has been committed.

  • mikeytown2 committed 7712ac0 on 7.x-2.x authored by emek
    Issue #2407769 by emek: Use of undefined constant...
ciss’s picture

Is 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?

mikeytown2’s picture

Status: Fixed » Needs work

Good point; I'll fix this.

mikeytown2’s picture

Status: Needs work » Fixed
FileSize
3.22 KB

  • mikeytown2 committed 3d9fef0 on 7.x-2.x
    Issue #2407769 by mikeytown2: Use of undefined constant...

  • mikeytown2 committed 3a7e8df on 7.x-2.x
    Issue #2407769 by mikeytown2: Use of undefined constant...

Status: Fixed » Closed (fixed)

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