Details
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.