Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-20240

Fatal error on all Angular pages if an extension is missing

    Details

    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      This is really weird. Steps to reproduce:

            0. Create from scratch a new Drupal/CiviCRM with Drupal 7.x and CiviCRM 4.7.19.

      1. Install any extension, for example CiviDiscount.
      2. Visit these URLs and observe that the page loads correctly: /civicrm/a/#/mailing/1 ("New Mailing"), /civicrm/a/#/cxn ("Connections")
      3. Delete the directory containing the extension files, e.g., /var/www/d7cividev/sites/default/files/civicrm/ext/org.civicrm.module.cividiscount/
      4. Repeat step 2; the pages still load correctly.
      5. Refresh the extensions cache, e.g., click the Refresh button on the page at /civicrm/admin/extensions?reset=1&action=browse; on that page you'll see that the extension is reported as "missing", and you'll get some popup error messages about the missing files, too.
      6. Repeat step 2; the pages present a fatal error: CRM_Extension_Exception_MissingException: Unknown extension: org.civicrm.module.cividiscount in CRM_Extension_Container_Collection->getContainer() (line 150 of /var/www/d7cividev/sites/all/modules/civicrm/CRM/Extension/Container/Collection.php).
      7. Just for fun, visit a known nonexistent angular url, e.g., /civicrm/a/#/nothingtoseehere and observe the same fatal error.

      I tried examining the output of debug_backtrace() but felt a little lost. If you have tips for debugging this, please post them and I'll look further.

        Attachments

          Activity

            People

            • Assignee:
              allenshaw Allen Shaw
              Reporter:
              allenshaw Allen Shaw
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: