CRAM should check whether md5.js is available during installation/activation of it. Unless there's a more elegant way, I'm thinking to insert a check in cram_install() followed by a drupal_set_message() if the file doesn't exist.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | cram.check_md5.d6.patch | 692 bytes | Freso |
| #2 | cram.check_md5.d6.patch | 809 bytes | Freso |
| #1 | cram.check_md5.d6.patch | 793 bytes | Freso |
Comments
Comment #1
Freso commentedAfter pounding #drupal (and specially killes, sorry for not being clear!) with questions, I think I figured out how to handle this. And that is what the attached patch does. However, so far it's only been tested theoretically, as I haven't had time to run it through my test site! So, yes, please test. :)
Comment #2
Freso commentedAnd here's another take on patch and wording. (Still not tested though.) The wording is taken from line 75 of cram.module, though it's been changed to use
@module_pathin the string, instead of using the variable directly.Comment #3
Freso commentedOkay, even if you're
returningFALSE, the module still registers as having been activated, but the schema still wasn't installed with the above snippet. I've changed it a bit to check whether the file exists and simply throw an error if it doesn't, but otherwise proceed as normal. There are also the watchdog messages that will (hopefully) remind the site admin(s) of the issue, if they do not fix it when they enable to module.Oh, and I'd like to make the watchdog warning use
@module_pathinstead of$module_pathas well? I know it's not user input, but it doesn't harm to have Drupal parse the string anyway, just for good measure. :)Comment #4
selmanj commentedhttp://api.drupal.org/api/function/hook_requirements/6
We should probably implement the check using this hook. Its supported in D5 as well too.