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

Problem with xml file not loaded

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Critical
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.16
    • Fix Version/s: 4.7.20
    • Component/s: CiviCase
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      I was getting this error:

      Warning: DOMDocument::load(): I/O warning : failed to load external entity
      "/srv/sites/crm.depressionteenshelp.com/sites/all/modules/civicrm/CRM/Case/xml/configuration.sample/Settings.xml" in
      CRM_Case_XMLRepository->retrieveFile() (line 139 of /srv/sites/crm.depressionteenshelp.com/sites/all/modules/civicrm/CRM/Case/XMLRepository.php).

      There were a lot of problems and I was about to get rid of CiviCRM.

      Then I made a change.

      I added the line:

      libxml_disable_entity_loader(false);

      To the file:

      /srv/sites/crm.depressionteenshelp.com/sites/all/modules/civicrm/CRM/Case/XMLRepository.php

      At line 139

      Now it looks like this:

      if ($fileName && file_exists($fileName))

      { // read xml file //watchdog('debug', print_r($fileName, 1)); libxml_disable_entity_loader(false); $dom = new DomDocument(); $dom->load($fileName); $dom->xinclude(); $fileXml = simplexml_import_dom($dom); }

      Dom->load couldn't load the xml because the entity loader was disabled.

      It works. It seems to be related to some php bug.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              esantanche Emanuele Santanche
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: