1

Below are log entires telling me what I know, but do not know how to resolve.

In reformatting custom data set, via import and export via phpmyadmin (need to switch from text to number field type), I changed the table name. Somewhere in the code, the "path" to the custom fields must be hard coded. As result, the custom field group lists displays the groups and fields, but when I attempt to do anything to the fields, i get spinning wheel of death. I attempted to use phpmyadmin to delete a field in the unlinnked table, and the result was same.

I need a "super privilidge" of some kind to delete the custom fields, then custom group and then recreate custom group/fields and then restore the data set.

I read another post about settings/developer/api. There exists api3 and api4.

Unawae of what to tell which api to do... Help...

Note: I was advised that my custom field group/table name was an issue in that it had (2) _ characters in a row, which caused the db issues. To resolve that, I changed db table name, eliminating one of the underscores, solving the db and phpmyadmin issue but compounding into issue with civicrm...

Feb 05 00:33:46  [info] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -18
    [message] => DB Error: no such table
    [mode] => 16
    [debug_info] =>         ALTER TABLE civicrm_value_income_house__15 DROP COLUMN `home_purchase_date_62` [nativecode=1146 ** Table '<domain>_wpdb.civicrm_value_income_house__15' doesn't exist]
    [type] => DB_Error
    [user_info] =>         ALTER TABLE civicrm_value_income_house__15 DROP COLUMN `home_purchase_date_62` [nativecode=1146 ** Table '<domain>_wpdb.civicrm_value_income_house__15' doesn't exist]
    [to_string] => [db_error: message="DB Error: no such table" code=-18 mode=callback callback=CRM_Core_Error::handle prefix="" info="        ALTER TABLE civicrm_value_income_house__15 DROP COLUMN `home_purchase_date_62` [nativecode=1146 ** Table '<domain>_wpdb.civicrm_value_income_house__15' doesn't exist]"]
)


Feb 05 00:33:46  [info] $backTrace = #0 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(232): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(921): CRM_Core_Error::handle(Object(DB_Error))
#2 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: no such table", -18, 16, (Array:2), "        ALTER TABLE civicrm_value_income_house__15 DROP COLUMN `home_purchase...")
#3 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(575): DB_Error->__construct(-18, 16, (Array:2), "        ALTER TABLE civicrm_value_income_house__15 DROP COLUMN `home_purchase...")
#4 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -18, 16, (Array:2), "        ALTER TABLE civicrm_value_income_house__15 DROP COLUMN `home_purchase...", "DB_Error", TRUE)
#5 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1907): PEAR->__call("raiseError", (Array:7))
#6 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-18, NULL, NULL, "        ALTER TABLE civicrm_value_income_house__15 DROP COLUMN `home_purchase...", "1146 ** Table '<domain>_wpdb.civicrm_value_income_house__15' doesn't exist")
#7 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("        ALTER TABLE civicrm_value_income_house__15 DROP COLUMN `home_purchase...")
#9 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2415): DB_common->query("        ALTER TABLE civicrm_value_income_house__15 DROP COLUMN `home_purchase...")
#10 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query("        ALTER TABLE civicrm_value_income_house__15 DROP COLUMN `home_purchase...")
#11 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(438): DB_DataObject->query("        ALTER TABLE civicrm_value_income_house__15 DROP COLUMN `home_purchase...")
#12 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1411): CRM_Core_DAO->query("        ALTER TABLE civicrm_value_income_house__15 DROP COLUMN `home_purchase...", FALSE)
#13 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/SchemaHandler.php(339): CRM_Core_DAO::executeQuery("        ALTER TABLE civicrm_value_income_house__15 DROP COLUMN `home_purchase...", (Array:0), TRUE, NULL, FALSE, FALSE)
#14 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/CustomField.php(1867): CRM_Core_BAO_SchemaHandler::alterFieldSQL((Array:7), FALSE, TRUE)
#15 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/CustomField.php(1153): CRM_Core_BAO_CustomField::createField(Object(CRM_Core_DAO_CustomField), "delete")
#16 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Custom/Form/DeleteField.php(104): CRM_Core_BAO_CustomField::deleteField(Object(CRM_Core_DAO_CustomField))
#17 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(489): CRM_Custom_Form_DeleteField->postProcess()
#18 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()
#19 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Custom_Form_DeleteField), "next", "Next")
#20 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Custom_Form_DeleteField), "next")
#21 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Custom_Form_DeleteField), "next")
#22 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("next")
#23 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Custom/Page/Field.php(264): CRM_Core_Controller->run()
#24 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(309): CRM_Custom_Page_Field->run((Array:5), NULL)
#25 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:14))
#26 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:5))
#27 /home/<domain>/public_html/wp-content/plugins/civicrm/civicrm.php(1248): CRM_Core_Invoke::invoke((Array:5))
#28 /home/<domain>/public_html/wp-includes/class-wp-hook.php(286): CiviCRM_For_WordPress->invoke("")
#29 /home/<domain>/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters("", (Array:1))
#30 /home/<domain>/public_html/wp-includes/plugin.php(453): WP_Hook->do_action((Array:1))
#31 /home/<domain>/public_html/wp-admin/admin.php(224): do_action("toplevel_page_CiviCRM")
#32 {main}
1

to identify the key values, I hunted the db and found a table called;

civicrm_custom_field table custom_group_id lists all fields associated with group ID

In it, each custom field is listed. And, the indexes are by group ID and field ID.

I used API4, selected custom field, action delete, where, custom group id,=,what I saw in table. That eliminated the custom fields.
Then ... selected custom group, action delete, where, custom group id,=,what I saw in table. That eliminated the custom fields group.

verified deletion in both phpmyadmin and inside civicrm custom field groups list!!!

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.