Background We have had Civicrm running for two years. last week a malicious attack occurred. We had to implement a back up copy taken of our crm on 12th June 2018. All is working except for a custom report called Residential Communities Report.
Issue When clicking on Membership Reports then clicking on Residential Communities Report it throws to a HTTP 500 Error. When looking at the error log it shows the following:
[17-Jun-2018 08:51:09 Australia/Sydney] PHP Fatal error: require_once(): Failed opening required 'CRM/Report/Form/Contact/Residential.php' (include_path='/home/gazzafm/public_html/crm/sites/default/files/civicrm/ext/uk.co.vedaconsulting.membershipchurnchart-master/:/home/gazzafm/public_html/crm/sites/default/files/civicrm/ext/uk.co.vedaconsulting.outlookapi-master/:/home/gazzafm/public_html/crm/sites/default/files/civicrm/ext/uk.org.futurefirst.networks.civipoints-1.0/uk.org.futurefirst.networks.civipoints-1.0/:/home/gazzafm/public_html/crm/sites/default/files/civicrm/ext/org.civicrm.module.cividiscount/:/home/gazzafm/public_html/crm/sites/default/files/civicrm/ext/eu.tttp.civisualize/:/home/gazzafm/public_html/crm/sites/default/files/civicrm/ext/nz.co.fuzion.extendedreport/:.:/home/gazzafm/public_html/crm/sites/all/modules/civicrm:/home/gazzafm/public_html/crm/sites/all/modules/civicrm/packages:.:/home/gazzafm/public_html/crm/sites/all/modules/civicrm:/home/gazzafm/public_html/crm/sites/all/modules/civicrm/packages:/home/gazzafm/public_html/crm/sites/all/modules/c in /home/gazzafm/public_html/crm/sites/all/modules/civicrm/CRM/Core/Controller.php on line 451
A lot of the error seems to also include extensions. We have checked those extensions and they are all working. Not sure why they are included in the error log.
Im including Line 451 from the Controller.php for reference here:
require_once str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
Im not certain why this one report is causing an error. We have checked the paths and the report is registered.
Any ideas would help. I have also included the code around the line 451 if that also helps:
$ext = CRM_Extension_System::singleton()->getMapper();
if ($ext->isExtensionClass($className)) {
require_once $ext->classToPath($className);
}
else {
require_once str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
}
$$stateName = new $className($stateMachine->find($className), $action, 'post', $formName);
if ($title) {
$$stateName->setTitle($title);
}
if ($options) {
$$stateName->setOptions($options);
}
if (property_exists($$stateName, 'urlPath') && isset($_GET[CRM_Core_Config::singleton()->userFrameworkURLVar])) {
$$stateName->urlPath = explode('/', $_GET[CRM_Core_Config::singleton()->userFrameworkURLVar]);
}
$this->addPage($$stateName);
$this->addAction($stateName, new HTML_QuickForm_Action_Direct());
//CRM-6342 -we need kill the reference here,
//as we have deprecated reference object creation.
unset($$stateName);
CRM_Report_Form_Contact_Residential
and that the file name isResidential.php
. In that case the custom php path is/home/gazzafm/public_html/crm/sites/default/files/civicrm/custom_php
and the file must be in theCRM/Report/Form/Contact
subdirectory.