Open atluxity opened 1 day ago
I dont know what I am doing, but this seemed to fix the imitate issue. Unknown if this is a fix or will break things down the road. Do not trust my code.
$template = CRM_Core_Smarty::singleton();
$extRoot = dirname(__FILE__) . DIRECTORY_SEPARATOR;
$extDir = $extRoot . 'templates';
$currentDirs = $template->getTemplateDir(); // Get the existing template directories
// Check if the current directories are in an array format
if (is_array($currentDirs)) {
array_unshift($currentDirs, $extDir); // Add the new directory to the beginning of the array
} else {
$currentDirs = [$extDir, $currentDirs]; // Create an array with the new and old directories
}
// Set the updated template directories
$template->setTemplateDir($currentDirs);
$include_path = $extRoot . PATH_SEPARATOR . get_include_path();
set_include_path($include_path);
Oh, and looks like
function activityical_civicrm_config(&$config) {
$extRoot = dirname(__FILE__) . DIRECTORY_SEPARATOR;
$template = CRM_Core_Smarty::singleton();
// Add the custom plugins directory using the addPluginsDir() method
$template->addPluginsDir($extRoot . 'Smarty' . DIRECTORY_SEPARATOR . 'plugins');
_activityical_civix_civicrm_config($config);
}
This no loger gives me errors, but do not think I know what I am doing
Attempting to install the extention through clicking "Install" in the webgui gives a wordpress critical error.
My environment:
from wp debug.log: