Answers.Body: <p>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.</p>
  
  <p>The most likely cause was the ICU update for PHP 7.2.16 - <a href="http://site.icu-project.org/download/64" rel="nofollow noreferrer">http://site.icu-project.org/download/64</a> - which came out &amp; 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.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-02T10:05:38.390Z
Answers.LastActivityDate: 2019-04-02T10:05:38.390Z
Answers.UserDisplayName: Nic
Body: <p>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):</p>
  
  <pre><code>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-&gt;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-&gt;buildQuickForm() 
  #4 /var/www/html/sitename/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Refresh.php(62): CRM_Core_Form-&gt;buildForm() 
  #5 /var/www/html/sitename/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Refresh-&gt;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-&gt;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-&gt;handle("refresh") 
  #8 /var/www/html/sitename/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(309): CRM_Core_Controller-&gt;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-&gt;dispatch() 
  #17 /var/www/html/sitename/libraries/src/Application/CMSApplication.php(196): Joomla\CMS\Application\AdministratorApplication-&gt;doExecute() 
  #18 /var/www/html/sitename/administrator/index.php(51): Joomla\CMS\Application\CMSApplication-&gt;execute() 
  #19 {main} 
  </code></pre>
  
  <p>This is happening on two Joomla 3.9.4 &amp; CiviCRM 5.11.0 sites.</p>
  
  <p><a href="https://i.sstatic.net/NjxUP.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/NjxUP.png" alt="enter image description here"></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-29T11:58:15.820Z
Comments.Text: Hi Nic, any server side changes?  Eg. PHP version upgraded?
Comments.UserDisplayName: Matthew Wire
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-01T12:15:07.377Z
Comments.Text: 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.
Comments.UserDisplayName: Nic
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-01T17:58:35.090Z
Comments.Text: 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
Comments.UserDisplayName: Nic
Tags: <joomla><error><search>
Title: Searches generate error 'CiviCRM_API3_Exception: "Constructor failed"'
ThreadText: # Searches generate error 'CiviCRM_API3_Exception: "Constructor failed"'
  
  (Asked by: username_0 on 2019-03-28)
  
  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](https://i.sstatic.net/NjxUP.png)](https://i.sstatic.net/NjxUP.png)
  
  **Tags:** joomla, error, search
  
  > **Comments:**
  > **username_1**: Hi Nic, any server side changes?  Eg. PHP version upgraded?  
  > **username_0**: 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.  
  > **username_0**: 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, @username_1 — 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  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-04-02. Score: 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.
  
  
  ---
  
  