2

When trying to create a New Contact of any type: Organization, Household, or Individual, the system reports "Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred." As a result, I cannot create contacts of any type. Any help would be appreciated, but this looks internal; perhaps some sort of installation issue. Thanks in advance!

Error message details are below:

backTrace

#0 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php(148): CRM_Core_Error::backtrace()
#1 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(HTML_QuickForm_Error))
#2 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm.php(2088): PEAR_Error->__construct("nonexistent html element", -3, 16, (Array:2), "Nonexistant element(s): 'custom_1_-1' in HTML_QuickForm::freeze()")
#3 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): HTML_QuickForm_Error->__construct(-3, 16, (Array:2), "Nonexistant element(s): 'custom_1_-1' in HTML_QuickForm::freeze()")
#4 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(236): PEAR::_raiseError(NULL, NULL, -3, 16, (Array:2), "Nonexistant element(s): 'custom_1_-1' in HTML_QuickForm::freeze()", "HTML_QuickForm_Error", TRUE)
#5 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm.php(1632): PEAR::__callStatic("raiseError", (Array:7))
#6 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm/CRM/Core/BAO/CustomField.php(972): HTML_QuickForm->freeze((Array:1))
#7 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm/CRM/Core/BAO/CustomGroup.php(1561): CRM_Core_BAO_CustomField::addQuickFormElement(Object(CRM_Contact_Form_Contact), "custom_1_-1", "1", "0")
#8 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm/CRM/Custom/Form/CustomData.php(170): CRM_Core_BAO_CustomGroup::buildQuickForm(Object(CRM_Contact_Form_Contact), (Array:1))
#9 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm/CRM/Contact/Form/Edit/CustomData.php(63): CRM_Custom_Form_CustomData::buildQuickForm(Object(CRM_Contact_Form_Contact))
#10 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm/CRM/Contact/Form/Contact.php(796): CRM_Contact_Form_Edit_CustomData::buildQuickForm(Object(CRM_Contact_Form_Contact))
#11 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm/CRM/Core/Form.php(623): CRM_Contact_Form_Contact->buildQuickForm()
#12 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(76): CRM_Core_Form->buildForm()
#13 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Contact_Form_Contact), "display")
#14 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Contact), "display")
#15 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php(347): HTML_QuickForm_Page->handle("display")
#16 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm/CRM/Utils/Wrapper.php(98): CRM_Core_Controller->run()
#17 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(285): CRM_Utils_Wrapper->run("CRM_Contact_Form_Contact", "New Contact", (Array:1))
#18 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:13))
#19 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:3))
#20 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm.php(121): CRM_Core_Invoke::invoke((Array:3))
#21 /home/redacted/public_html/redacted/administrator/components/com_civicrm/civicrm.php(40): civicrm_invoke()
#22 /home/redacted/public_html/redacted/libraries/src/Component/ComponentHelper.php(402): require_once("/home/redacted/public_html/redacted/administrator/components/com_civicrm/civic...")
#23 /home/redacted/public_html/redacted/libraries/src/Component/ComponentHelper.php(377): Joomla\CMS\Component\ComponentHelper::executeComponent("/home/redacted/public_html/redacted/administrator/components/com_civicrm/civic...")
#24 /home/redacted/public_html/redacted/libraries/src/Application/AdministratorApplication.php(101): Joomla\CMS\Component\ComponentHelper::renderComponent("com_civicrm")
#25 /home/redacted/public_html/redacted/libraries/src/Application/AdministratorApplication.php(159): Joomla\CMS\Application\AdministratorApplication->dispatch()
#26 /home/redacted/public_html/redacted/libraries/src/Application/CMSApplication.php(196): Joomla\CMS\Application\AdministratorApplication->doExecute()
#27 /home/redacted/public_html/redacted/administrator/index.php(51): Joomla\CMS\Application\CMSApplication->execute()
#28 {main}

Additional Details:
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -3
    [message] => QuickForm Error: nonexistent html element
    [mode] => 16
    [debug_info] => Nonexistant element(s): 'custom_1_-1' in HTML_QuickForm::freeze()
    [type] => HTML_QuickForm_Error
    [user_info] => Nonexistant element(s): 'custom_1_-1' in HTML_QuickForm::freeze()
    [to_string] => [html_quickform_error: message="nonexistent html element" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="QuickForm Error: " info="Nonexistant element(s): 'custom_1_-1' in HTML_QuickForm::freeze()"]
)

In response to the first person who answered, below is the result of a query of the civicrm_custom_fields table from phpMyAdmin.

SELECT * FROM civicrm_custom_field WHERE id = 1

1   1   Areas   Areas   String  Multi-Select    
    NULL
    0   1   0   1   
    NULL
    
    NULL
    
    NULL
    
    NULL
    
    NULL
    1   1   
    NULL
    255 
    NULL
    
    NULL
    
    NULL
    
    NULL
    60  4   areas   96  0   
    NULL
    0   

Here's the same table data expressed as an SQL INSERT query (also exported from phpMyAdmin). This one gives the column names.

INSERT INTO `civicrm_custom_field` (`id`, `custom_group_id`, `name`, `label`, `data_type`, `html_type`, `default_value`, `is_required`, `is_searchable`, `is_search_range`, `weight`, `help_pre`, `help_post`, `mask`, `attributes`, `javascript`, `is_active`, `is_view`, `options_per_line`, `text_length`, `start_date_years`, `end_date_years`, `date_format`, `time_format`, `note_columns`, `note_rows`, `column_name`, `option_group_id`, `serialize`, `filter`, `in_selector`) VALUES
(1, 1, 'Areas', 'Areas', 'String', 'Multi-Select', NULL, 0, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 1, 1, NULL, 255, NULL, NULL, NULL, NULL, 60, 4, 'areas', 96, 0, NULL, 0);

Regarding the possibility of the Areas extension being installed, unless that content came with the installation of Civi, I don't know how it got there. I don't see an Areas extension here.

Screen clip of the ext folder in my installation

1

That backtrace is very helpful.

The issue has something to do with your custom field with an ID of 1. I've seen this when, for instance, the "Search by Range" option was set on a field that displays as an option value. Somewhere in the field's definition are conflicting settings.

If this isn't enough to track down the issue, please run this SQL command:

SELECT * FROM civicrm_custom_field WHERE id = 1;

and edit your question to include the results.

10
  • Interesting. There was no custom field with ID 1, only one with ID 2. So I deleted that one and now I cannot get to the CiviCRM component at all. Bonus! I very likely deleted whatever the original ID 1 was because it didn't apply to my case. I should have just modified it, I suppose. Who knew? So now how to fix? Will look at table and see if I can finagle one in there. – Bruce S Nov 2 '20 at 18:14
  • Even more interesting... there IS and ID=1 in the database, but I don't know what's wrong with it. – Bruce S Nov 2 '20 at 18:17
  • And it gets better... now when I log into the site back end I get the error ""An error has occurred. 0 Expected one CustomField but found 0" and cannot access anything at all in the backend (NOTHING, including the main Joomla administrator menu). – Bruce S Nov 2 '20 at 18:34
  • Looks like the is_view field is 1, which by itself shouldn't crash but would prevent the field from being a proper dropdown. But I'd also check select * from civicrm_custom_group where id=1 since it sounds like that's what might be missing if you didn't even see the field before in the admin screens. For getting back in, I don't know enough about joomla - is there a way to temporarily disable civicrm from the command line? – Demerit Nov 2 '20 at 19:38
  • @BruceS When you say you deleted the custom field - did you load the demo data? Because CiviCRM doesn't normally ship with custom fields already. And when you say you deleted it, did you delete it through the UI? Or through the database? – Jon G - Megaphone Tech Nov 2 '20 at 23:20
0

I finally gave up and renamed the com_civicrm folder in file manager and removed all the civi records from the extensions table. Got my site back at least. But now I have to start over again with Civi. Oh well. Maybe phpMyAdmin will let me drop all those tables and maybe it won't.

Thanks everyone for trying to help, but this was very broken. I'll recover.

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.