I created an extension module with civix
then cd'd to the module directory and tried to create a custom report based on a copy of an existing report. I used the following command:
$ civix generate:report --copy CRM_Report_Form_Case_Summary DemandCaseReport CiviCase
This generates an error message that I haven't yet been able to fix.
Initialize report CRM_Case_Form_Report_DemandCaseReport
[RuntimeException]
Booted CiviCRM, but failed to find 'api/class.api.php'
generate:report [--webPath [WEBPATH]] [--copy [COPY]] [--] <<ClassName>> <<CiviComponent>>
I'm using civix version v16.03.2-3-geeff5c0. It's a WordPress installation.
I can see that a file with that name resides in /wp-content/plugins/civicrm/civicrm/api/class.api.php
Is there an environment variable that I should be setting or something else that I'm overlooking?
Grateful for any tips, thanks.
include_path
. I added the full path name/Applications/MAMP/htdocs/xxx/civcrm/wp-content/plugins/civicrm/civicrm
(whereapi
resides) toinclude_path
in thephp.ini
(checked I got the right one withphp --ini
). That didn't work. But I got it to work by soft linking the api directory into the extension directory (changed directory to the extension directory and did the following command:$ ln -s /Applications/MAMP/htdocs/xxx/civcrm/wp-content/plugins/civicrm/civicrm/api .