0

Either toolbar searches or advanced searches on Joomla/Civi latest version generate the following error (with full debugging/backtrace on - and reformatting to make more legible, the actual error looks like below):

CiviCRM_API3_Exception: "Constructor failed"
#0 /var/www/html/sitename/administrator/components/com_civicrm/civicrm/CRM/Core/Form.php(1394): civicrm_api3("address", "getoptions", (Array:4)) 
#1 /var/www/html/sitename/administrator/components/com_civicrm/civicrm/CRM/Contact/Form/Search/Criteria.php(415): CRM_Core_Form->addSelect("world_region", (Array:3)) 
#2 /var/www/html/sitename/administrator/components/com_civicrm/civicrm/CRM/Contact/Form/Search/Advanced.php(150): CRM_Contact_Form_Search_Criteria::location(Object(CRM_Contact_Form_Search_Advanced)) 
#3 /var/www/html/sitename/administrator/components/com_civicrm/civicrm/CRM/Core/Form.php(606): CRM_Contact_Form_Search_Advanced->buildQuickForm() 
#4 /var/www/html/sitename/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Refresh.php(62): CRM_Core_Form->buildForm() 
#5 /var/www/html/sitename/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Refresh->perform(Object(CRM_Contact_Form_Search_Advanced), "refresh") 
#6 /var/www/html/sitename/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Search_Advanced), "refresh") 
#7 /var/www/html/sitename/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("refresh") 
#8 /var/www/html/sitename/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(309): CRM_Core_Controller->run((Array:4), (Array:0)) 
#9 /var/www/html/sitename/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:13)) 
#10 /var/www/html/sitename/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4)) 
#11 /var/www/html/sitename/administrator/components/com_civicrm/civicrm.php(121): CRM_Core_Invoke::invoke((Array:4)) 
#12 /var/www/html/sitename/administrator/components/com_civicrm/civicrm.php(40): civicrm_invoke() 
#13 /var/www/html/sitename/libraries/src/Component/ComponentHelper.php(402): require_once("/var/www/html/sitename/administrator/components/com_civicrm/...") 
#14 /var/www/html/sitename/libraries/src/Component/ComponentHelper.php(377): Joomla\CMS\Component\ComponentHelper::executeComponent("/var/www/html/sitename/administrator/components/com_civicrm/...") 
#15 /var/www/html/sitename/libraries/src/Application/AdministratorApplication.php(101): Joomla\CMS\Component\ComponentHelper::renderComponent("com_civicrm") 
#16 /var/www/html/sitename/libraries/src/Application/AdministratorApplication.php(159): Joomla\CMS\Application\AdministratorApplication->dispatch() 
#17 /var/www/html/sitename/libraries/src/Application/CMSApplication.php(196): Joomla\CMS\Application\AdministratorApplication->doExecute() 
#18 /var/www/html/sitename/administrator/index.php(51): Joomla\CMS\Application\CMSApplication->execute() 
#19 {main} 

This is happening on two Joomla 3.9.4 & CiviCRM 5.11.0 sites.

enter image description here

  • Hi Nic, any server side changes? Eg. PHP version upgraded? – Matthew Wire Mar 29 at 11:58
  • Sorry, didn't get a notification for this comment! As far as I can tell, according to the SysAdmin, there were no server changes. Downloading the site to my local MAMP 5.3 setup and search works fine which would suggest it is server side, but any changes must be higher up the stack, ie at Telehouse. – Nic Apr 1 at 12:15
  • A bit more info now. It looks like PHP was hitting it's memory limit of 512mb. Raising that to 900mb has removed the error. In terms of upgrades that might have triggered this, @MatthewWire — these are the changes that happened, php72-intl-7.2.16_1 looks the most likely culprit. Upgrade of icu-63.1_1,1 to icu-64.1,1 Upgrade of sqlite3-3.27.1 to sqlite3-3.27.1_1 Upgrade of php72-intl-7.2.16 to php72-intl-7.2.16_1 ( possibly related?) Upgrade of postgresql95-client-9.5.16 to postgresql95-client-9.5.16_1 Upgrade of sendmail+tls+sasl2-8.15.2_17 to sendmail+tls+sasl2-8.15.2_18 – Nic Apr 1 at 17:58
1

On the surface this was a memory issue - increasing PHP memory limit from 512mb to 900mb fixed the error and let search work as before.

The most likely cause was the ICU update for PHP 7.2.16 - http://site.icu-project.org/download/64 - which came out & was merged into FreeBSD the night before the problems emerged. I can't really take it any further than that. The ICU update referenced "Various Out-Of-Memory (OOM) issues have been fixed" so maybe that's a clue if someone else had the same problem and can't increase PHP memory limit further.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.