CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Creating and Deleting Custom Fields in 4.2.6 on WordPress
Pages: [1]

Author Topic: Creating and Deleting Custom Fields in 4.2.6 on WordPress  (Read 2122 times)

need2

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: WordPress
  • MySQL version: 5.1.68
  • PHP version: 5.3.19
Creating and Deleting Custom Fields in 4.2.6 on WordPress
May 07, 2013, 06:21:23 pm
Hi,

We've just started using CiviCRM and when I create a custom field, it gives me an error message, saying DB error, but then when I went back, the field had saved.  When I try to delete a custom field, I get the same error msg "DB error not found" - it kicks me out of the CRM onto the main page of our website, and the field doesn't get deleted.

Any help or insight would be so much appreciated!!  Thank you!!

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Creating and Deleting Custom Fields in 4.2.6 on WordPress
May 07, 2013, 06:32:05 pm
Do you get this on the latest CiviCRM 4.2 version (4.2.9)?
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

need2

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: WordPress
  • MySQL version: 5.1.68
  • PHP version: 5.3.19
Re: Creating and Deleting Custom Fields in 4.2.6 on WordPress
May 08, 2013, 10:08:03 am
Thanks for the reply.  We're using version 4.2.6

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Creating and Deleting Custom Fields in 4.2.6 on WordPress
May 08, 2013, 10:21:07 am
Would be helpful to get the error message details. Try 'view source' on the error page. If that doesn't have more details, you can check the CiviCRM log file (find this in the wp-content/plugins/files/civicrm/ConfigAndLog directory).
Protect your investment in CiviCRM by  becoming a Member!

need2

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: WordPress
  • MySQL version: 5.1.68
  • PHP version: 5.3.19
Re: Creating and Deleting Custom Fields in 4.2.6 on WordPress
May 08, 2013, 10:35:59 am
I'll check the CRM log you referenced.  I  don't have a view source link, so maybe there's a bigger problem?  I attached a screen shot.  You'll see I'm using safari on Mac, but I have the same problem using Firefox on a PC.

Thanks 


« Last Edit: May 08, 2013, 10:45:27 am by need2 »

need2

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: WordPress
  • MySQL version: 5.1.68
  • PHP version: 5.3.19
Re: Creating and Deleting Custom Fields in 4.2.6 on WordPress
May 08, 2013, 10:47:10 am
I can't find that log that you mentioned in the WP site.
We're using WordPress 3.5.1 with Genesis 1.9.1 if that makes a difference?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Creating and Deleting Custom Fields in 4.2.6 on WordPress
May 08, 2013, 01:00:13 pm
View source is something you do in your browser menus (View -> Source) to view the HTML source of the page. Try that first. If no additional details showing, then you'll need to do a 'locate' on the ConfigAndLog folder on your web server - it will be somewhere under your WordPress site root directory.
Protect your investment in CiviCRM by  becoming a Member!

need2

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: WordPress
  • MySQL version: 5.1.68
  • PHP version: 5.3.19
Re: Creating and Deleting Custom Fields in 4.2.6 on WordPress
May 08, 2013, 01:47:13 pm
Ah, thank you!  I have our webmaster looking into the other log you mentionned, and the source error is too big to paste here, is there a specific area I should be pasting?  Does this help:

<head>
  <title>Confirm Custom Field Delete</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <base href="/wp-content/plugins/civicrm/civicrm/" />
  <style type="text/css" media="screen">@import url(/wp-content/plugins/civicrm/civicrm/css/civicrm.css);</style>
  <style type="text/css" media="screen">@import url(/wp-content/plugins/civicrm/civicrm/css/extras.css);</style>
</head>
<body>
<div id="crm-container" lang="en" xml:lang="en">
<div class="messages status">  <div class="icon red-icon alert-icon"></div>
 <span class="status-fatal">Sorry but we are not able to provide this at the moment.</span>
    <div class="crm-section crm-error-message"></div>
            <hr style="solid 1px" />
        <div class="crm-section crm-error-message">DB Error: not found</div>
            <p><a href="http://need2.ca/" title="Main Menu">Return to home page.</a></p>
</div>
</div>
<script language="JavaScript">
function toggle( element ) {
    var className = element.className;
    if ( className  == 'crm-accordion-wrapper crm-accordion_title-accordion crm-accordion-closed crm-fatal-error-details-block') {
        element.className = 'crm-accordion-wrapper crm-accordion_title-accordion crm-accordion-open crm-fatal-error-details-block';
    } else {
        element.className = 'crm-accordion-wrapper crm-accordion_title-accordion crm-accordion-closed crm-fatal-error-details-block';
    }
}
</script>

</body>
</html>
« Last Edit: May 08, 2013, 02:09:31 pm by need2 »

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Creating and Deleting Custom Fields in 4.2.6 on WordPress
May 09, 2013, 09:06:45 am
That html source unfortunately doesn't include the specific database error. Hopefully you're webmaster can find the log file and check for instances of a database error relating to the civicrm_custom_field table.
Protect your investment in CiviCRM by  becoming a Member!

need2

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: WordPress
  • MySQL version: 5.1.68
  • PHP version: 5.3.19
Re: Creating and Deleting Custom Fields in 4.2.6 on WordPress
May 09, 2013, 02:59:43 pm
Hi Dave,
This is from the log, hope it can help shed some light on this:

[db_error: message="DB Error: not found" code=-4 mode=callback callback=CRM_Core_Error::handle prefix="" info="        ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emergency_contact__1_2` [nativecode=1091 ** Can't DROP 'emergency_contact__1_2'; check that column/key exists]"]
)


May 08 00:53:48  [info] $backTrace = #0 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(196): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB.php(968): PEAR_Error->PEAR_Error("DB Error: not found", -4, 16, (Array:2), "        ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emerge...")
#4 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-4, 16, (Array:2), "        ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emerge...")
#5 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1903): PEAR->raiseError(NULL, -4, NULL, NULL, "        ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emerge...", "DB_Error", TRUE)
#6 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(898): DB_common->raiseError(-4, NULL, NULL, NULL, "1091 ** Can't DROP 'emergency_contact__1_2'; check that column/key exists")
#7 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(327): DB_mysql->mysqlRaiseError()
#8 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("        ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emerge...")
#9 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2421): DB_common->query("        ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emerge...")
#10 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1613): DB_DataObject->_query("        ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emerge...")
#11 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(155): DB_DataObject->query("        ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emerge...")
#12 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(922): CRM_Core_DAO->query("        ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emerge...", FALSE)
#13 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/SchemaHandler.php(299): CRM_Core_DAO::executeQuery("        ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emerge...", (Array:0), TRUE, NULL, FALSE, FALSE)
#14 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/CustomField.php(1803): CRM_Core_BAO_SchemaHandler::alterFieldSQL((Array:7), FALSE)
#15 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/CustomField.php(1064): CRM_Core_BAO_CustomField::createField(Object(CRM_Core_DAO_CustomField), "delete")
#16 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Custom/Form/DeleteField.php(114): CRM_Core_BAO_CustomField::deleteField(Object(CRM_Core_DAO_CustomField))
#17 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(246): CRM_Custom_Form_DeleteField->postProcess()
#18 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(159): CRM_Core_Form->mainProcess()
#19 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(60): CRM_Core_StateMachine->perform(Object(CRM_Custom_Form_DeleteField), "next", "Next")
#20 /home/need2/public_html/wp/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/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Custom_Form_DeleteField), "next")
#22 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(289): HTML_QuickForm_Page->handle("next")
#23 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Custom/Page/Field.php(250): CRM_Core_Controller->run()
#24 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(212): CRM_Custom_Page_Field->run((Array:5), NULL)
#25 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm.php(271): CRM_Core_Invoke::invoke((Array:5))
#26 [internal function](): civicrm_wp_invoke("")
#27 /home/need2/public_html/wp/wp-includes/plugin.php(406): call_user_func_array("civicrm_wp_invoke", (Array:1))
#28 /home/need2/public_html/wp/wp-admin/admin.php(151): do_action("toplevel_page_CiviCRM")
#29 {main}


May 08 17:22:59  [info] $Fatal Error Details = Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -4
    [message] => DB Error: not found
    [mode] => 16
    [debug_info] =>         ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emergency_contact__1_2` [nativecode=1091 ** Can't DROP 'emergency_contact__1_2'; check that column/key exists]
    [type] => DB_Error
    [user_info] =>         ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emergency_contact__1_2` [nativecode=1091 ** Can't DROP 'emergency_contact__1_2'; check that column/key exists]
    [to_string] => [db_error: message="DB Error: not found" code=-4 mode=callback callback=CRM_Core_Error::handle prefix="" info="        ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emergency_contact__1_2` [nativecode=1091 ** Can't DROP 'emergency_contact__1_2'; check that column/key exists]"]
)


May 08 17:23:00  [info] $backTrace = #0 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(196): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB.php(968): PEAR_Error->PEAR_Error("DB Error: not found", -4, 16, (Array:2), "        ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emerge...")
#4 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-4, 16, (Array:2), "        ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emerge...")
#5 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1903): PEAR->raiseError(NULL, -4, NULL, NULL, "        ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emerge...", "DB_Error", TRUE)
#6 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(898): DB_common->raiseError(-4, NULL, NULL, NULL, "1091 ** Can't DROP 'emergency_contact__1_2'; check that column/key exists")
#7 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(327): DB_mysql->mysqlRaiseError()
#8 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("        ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emerge...")
#9 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2421): DB_common->query("        ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emerge...")
#10 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1613): DB_DataObject->_query("        ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emerge...")
#11 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(155): DB_DataObject->query("        ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emerge...")
#12 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(922): CRM_Core_DAO->query("        ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emerge...", FALSE)
#13 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/SchemaHandler.php(299): CRM_Core_DAO::executeQuery("        ALTER TABLE civicrm_value_volunteer_information_1 DROP COLUMN `emerge...", (Array:0), TRUE, NULL, FALSE, FALSE)
#14 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/CustomField.php(1803): CRM_Core_BAO_SchemaHandler::alterFieldSQL((Array:7), FALSE)
#15 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/CustomField.php(1064): CRM_Core_BAO_CustomField::createField(Object(CRM_Core_DAO_CustomField), "delete")
#16 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Custom/Form/DeleteField.php(114): CRM_Core_BAO_CustomField::deleteField(Object(CRM_Core_DAO_CustomField))
#17 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(246): CRM_Custom_Form_DeleteField->postProcess()
#18 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(159): CRM_Core_Form->mainProcess()
#19 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(60): CRM_Core_StateMachine->perform(Object(CRM_Custom_Form_DeleteField), "next", "Next")
#20 /home/need2/public_html/wp/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/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Custom_Form_DeleteField), "next")
#22 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(289): HTML_QuickForm_Page->handle("next")
#23 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Custom/Page/Field.php(250): CRM_Core_Controller->run()
#24 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(212): CRM_Custom_Page_Field->run((Array:5), NULL)
#25 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm.php(271): CRM_Core_Invoke::invoke((Array:5))
#26 [internal function](): civicrm_wp_invoke("")
#27 /home/need2/public_html/wp/wp-includes/plugin.php(406): call_user_func_array("civicrm_wp_invoke", (Array:1))
#28 /home/need2/public_html/wp/wp-admin/admin.php(151): do_action("toplevel_page_CiviCRM")
#29 {main}


May 08 18:06:51  [info] Ignoring exception thrown by nullHandler: -1, DB Error: unknown error

May 08 18:06:51  [info] $backTrace = #0 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(693): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::nullHandler(Object(DB_Error))
#2 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB.php(968): PEAR_Error->PEAR_Error("DB Error: unknown error", -1, 16, (Array:2), "CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
#4 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-1, 16, (Array:2), "CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
#5 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1903): PEAR->raiseError(NULL, -1, NULL, NULL, "CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...", "DB_Error", TRUE)
#6 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(898): DB_common->raiseError(-1, NULL, NULL, NULL, "1419 ** You do not have the SUPER privilege and binary logging is enabled (yo...")
#7 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(327): DB_mysql->mysqlRaiseError()
#8 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
#9 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2421): DB_common->query("CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
#10 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1613): DB_DataObject->_query("CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
#11 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(155): DB_DataObject->query("CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
#12 /home/need2/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1478): CRM_Core_DAO->query("CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Creating and Deleting Custom Fields in 4.2.6 on WordPress
May 09, 2013, 03:22:28 pm
Can you try to replicate the same on our demo
http://demo.civicrm.org/
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

need2

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: WordPress
  • MySQL version: 5.1.68
  • PHP version: 5.3.19
Re: Creating and Deleting Custom Fields in 4.2.6 on WordPress
May 09, 2013, 03:39:47 pm
It worked fine on your demo, I created a custom field and deleted it, but it's a different CRM version, and WP version than what we are using, and if it's something wrong on the install or settings on our end, I don't know how helpful that is?

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Creating and Deleting Custom Fields in 4.2.6 on WordPress
May 09, 2013, 03:56:31 pm
need2 :

Do consider upgrading to latest CiviCRM release for 4.2 (4.2.9). Its bit hard for us to support old versions.

-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Creating and Deleting Custom Fields in 4.2.6 on WordPress
May 10, 2013, 11:30:13 am
The error in your log file indicates a data integrity issue in the DB and I don't think upgrading will help that. Hard to say how the problem occurred initially ... did someone possibly make changes to the DB directly ?? Or did an error occur when you initially created the custom field?

In any case I think you or your web master / site admin will need to fix things directly via mySql at this point. You'll need to:

1. Find the record in civicrm_custom_field table for this custom field - try:
SELECT * from civicrm_custom_field WHERE column_name = 'emergency_contact__1_2';

2. Check for a column with a similar name in the table which stores the custom field data. In this case:

SHOW CREATE TABLE civicrm_value_volunteer_information_1;

The problem appears to be that the custom_field table 'thinks' there's a column in civicrm_value_volunteer_information_1 called emergency_contact__1_2 - but that column doesn't exist (at least under that name).

Depending on what you find, you may need to manually delete the row in civicrm_custom_field OR update the column_name value to match the column that actually exists in civicrm_value_volunteer_information_1 table.

In either case, you should also truncate (delete all rows) in the civicrm_cache table (this is temp storage and that data is rebuilt automatically - so no worries about doing that).
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Creating and Deleting Custom Fields in 4.2.6 on WordPress

This forum was archived on 2017-11-26.