Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 920
    • Issues 920
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Development
  • Core
  • Issues
  • #1796

Closed
Open
Opened Jun 04, 2020 by Michael McAndrew@michaelmcandrewDeveloper

Better message for missing module files

I have come across messages like this

image

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.

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: dev/core#1796