Drupal core includes path.inc this way:
require_once DRUPAL_ROOT . '/' . variable_get('path_inc', 'includes/path.inc');
http://cgit.drupalcode.org/drupal/tree/includes/common.inc?h=7.x#n5254

Acquia Purge includes it this way on line 626:
require_once DRUPAL_ROOT . '/includes/path.inc';
http://cgit.drupalcode.org/acquia_purge/tree/acquia_purge.module?h=7.x-1...

In most cases, this isn't a problem however when using the old pathcache module, this causes the following error and prevents Drupal from bootstrapping.

$ drush cc all
Drush command terminated abnormally due to an unrecoverable error.                                                 [error]
Error: Cannot redeclare drupal_path_initialize() (previously declared in
/Users/zzz/Sites/wfmcom/docroot/sites/all/modules/contrib/pathcache/path.inc:15) in
/Users/zzz/Sites/wfmcom/docroot/includes/path.inc, line 22

Fatal error: Cannot redeclare drupal_path_initialize() (previously declared in /Users/zzz/Sites/wfmcom/docroot/sites/all/modules/contrib/pathcache/path.inc:15) in /Users/zzz/Sites/wfmcom/docroot/includes/path.inc on line 22

Attached patch brings Acquia Purge in line with Drupal core behavior and makes the world a happy place.

CommentFileSizeAuthor
path_includes_fix.patch658 bytesselwynpolit

Comments

selwynpolit created an issue. See original summary.

  • nielsvm committed 36886dc on 7.x-1.x authored by selwynpolit
    Issue #2888192 by selwynpolit: Module is incorrectly requiring path_inc
    
nielsvm’s picture

Thank you very much for catching this and the fix you provided!

I've just committed it and it will become part of version 7.x-1.4-beta2 as soon as it is released!

Thank you!,

Niels

nielsvm’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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