Hi,

like the title says if you want to install drupal with a custom profile and you has any module with dependency to syntaxhighlighter the profile breaks at the beginning. The problem is the inproper usage of hook_requirements there are usage of variable_del / variable_get that call database operations but there is no database at this point of installing.

i attach a workaround patch that moves variable_del to flush_caches and return the hook_requirements if we are on install phase

Comments

blackice2999’s picture

blackice2999’s picture

Status: Active » Needs review
fizk’s picture

Thanks for the patch, it looks good. I'm not sure why this part was needed, though:

-  // lib location may have moved, delete the cached location to force scan again
-  variable_del('syntaxhighlighter_lib_location');
+

since we've already checked that we're in runtime mode.

blackice2999’s picture

Hi,

i think for deleting a cache based value should be exist in hook_flush_caches. Thats all.

  • Commit 33388ea on 7.x-2.x authored by Blackice2999, committed by fizk:
    #2224103 Blackice2999: Only run hook_requirements() when in runtime mode...
fizk’s picture

Status: Needs review » Fixed

That seems like a separate issue, so let's leave it as-is for now. I've committed the runtime check:

http://drupalcode.org/project/syntaxhighlighter.git/commitdiff/33388ead7...

Status: Fixed » Closed (fixed)

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