Better message for missing module files
I have come across messages like this
enough times for it to annoy me enough to want to submit a patch along the lines of
diff --git a/src/civicrm/civicrm/CRM/Utils/Hook.php b/src/civicrm/civicrm/CRM/Utils/Hook.php
index 656238f..b169f79 100644
--- a/src/civicrm/civicrm/CRM/Utils/Hook.php
+++ b/src/civicrm/civicrm/CRM/Utils/Hook.php
@@ -329,8 +329,11 @@ abstract class CRM_Utils_Hook {
foreach ($civiModules as $civiModule) {
if (!file_exists($civiModule['filePath'])) {
CRM_Core_Session::setStatus(
- ts('Error loading module file (%1). Please restore the file or disable the module.',
- [1 => $civiModule['filePath']]),
+ ts("Error loading file '%1' for module '%2'. Please restore the file or disable the module.",
+ [
+ 1 => $civiModule['filePath'],
+ 2 => $civiModule['prefix'],
+ ]),
ts('Warning'), 'error');
continue;
}
I'm testing the patch on a client site as we speak. Thought I would create this issue as a placeholder.