CRM-18304 Error loading module file (). Please restore the file or disable the module.

    Details

    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      Step to reproduce
      Installed civicrm 4.6.14
      Configured Extension path, url and enabled few extensions
      (e.g. com.cividesk.normalize, com.cividesk.helptab )
      Enabled Multilingual for English and French

      Now on every page load / language switch, it showing following error
      Error loading module file (). Please restore the file or disable the module.

      This is my observation
      While Prepare config object first time, uf_match table is updating to store language against logged in contact id (CRM_Core_BAO_ConfigSetting::retrieve). CRM_Core_DAO=>save() method calling hook CRM_Utils_Hook::postSave($this); call reached to CRM_Extension_System->__construct()
      where $config object get used to get details about 'extensionsDir' & 'extensionsURL'. at this stage config object is not prepared and this information not present at all.

      attached file with back-trace and config object output in CRM_Extension_System->__construct()

        Attachments

          Activity

          [CRM-18304] Error loading module file (). Please restore the file or disable the module.
          Tim Otten added a comment -

          For background/reference: CRM_Core_Config has some deep flaws in <=v4.6. We spent a ton of time working on them for v4.7.

          Wonder if this applies to v4.7. My hunch is that v4.7 will work better in this use-case. There, the extension-system explicitly boots before the localization/ufmatch stuff. (Observe https://github.com/civicrm/civicrm-core/blob/4.7.3/CRM/Core/Config.php#L101Civi\Core\Container::boot() comes before CRM_Core_BAO_ConfigSetting::applyLocale()):

          If you absolutely must patch v4.6, you could maybe look at breaking apart CRM_Core_BAO_ConfigSetting::retrieve() so that CRM_Core_BAO_ConfigSetting::applyLocale() is a separate function. Then fire applyLocale() later in the process. (Initializing session-scoped locale data while retrieving domain-scoped settings is... silly...)

          In CRM-10250, I offered a comment which also applies here: "It would be nice to get some bugfixes in them (v4.4/v4.6), but bugfixes to central/complicated code (like CRM_Core_Config) come at the risk of regression, and it's safer to do that as part of major-release (with alpha/beta testing cycle). The LTS crew is a bit more permissive/adventurous about bugfixes, and (if someone wants to file a PR) it sounds like they'd welcome a PR whenever 4.6 moves to LTS maintenance."

          Eileen McNaughton added a comment -

          Sunil - have you tested against 4.7 ?

          Fred Layberger added a comment -

          I'm receiving the same error message (Error loading module file (). Please restore the file or disable the module) after upgrading to 4.7.12.

          Sunil Pawar added a comment -

          I have fixed this issue by back-porting some changes from 4.7 to 4.6 as suggested by Tim (separated locale part). Also I have not tested same issue on 4.7 version, so not sure about it.

          Here are the changes i did in 4.6 version https://github.com/cividesk/civicrm-core/commit/70f2d306e91e6ec837b9000b0668cd24e01dc46e.patch

          Eileen McNaughton added a comment -

          seems like issue as described does not affect 4.7 - there are some variations on this so create a new issue if you hit this on latest version

            People

            • Assignee:
              Unassigned
              Reporter:
              Sunil Pawar

              Dates

              • Created:
                Updated:
                Resolved: