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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Cannot delete custom field
Pages: [1]

Author Topic: Cannot delete custom field  (Read 1241 times)

dcraftinc

  • Guest
Cannot delete custom field
August 12, 2009, 06:14:08 pm
I am running CiviCRM ver 2.2.8 as standalone, php ver 5.2.5, my sql 5.0.8.
I had my ISP (TMDHosting) install CiviCRM, then I went through the Administer CiviCRM and went thru the checklist.  So far so good.

Then I added a custom group and a few custom fields and that went fine.  I could preview them then decided I needed to change a few from Select type fields to CheckBox fields. That worked fine.  Then I thought it would be nice to have the checkbox option labels indicate what value was stored so I put parentheses around the letter in the label that would be store.  e.g. (A)bsentee voted.  The "A" is stored.  This seemed to break something.  I suspect that the parentheses resulted in the system treating it as an array element. 

I tried to delete the field but kept getting an error.  Since I had not gone very far in the config and I figured I corrupted the table, I asked TMD hosting to do a complete reinstall.  Then I redid everything but when I got to creating this custom field, I was not able to.  CiviCRM gave me an error yet the field is shown.  And I could not delete it.  Same error as before which I copy and pasted below.

I tried to create a simpler field, a Birth Date field.  And I had the same problem.  Civi said it could not create it, yet it is there.  I try to delete it, I get an error and I can't delete it.

Any suggestions?

unrecoverable error
    Sorry. A non-recoverable error has occurred.

    DB Error: not found

    Database Error Code: Can't DROP 'voted_last_primary_5'; check that column/key exists, 1091

    Return to home page.

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_constituent_information_1 DROP COLUMN `voted_last_primary_5` [nativecode=1091 ** Can't DROP 'voted_last_primary_5'; check that column/key exists]
    [type] => DB_Error
    [user_info] =>         ALTER TABLE civicrm_value_constituent_information_1 DROP COLUMN `voted_last_primary_5` [nativecode=1091 ** Can't DROP 'voted_last_primary_5'; 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_constituent_information_1 DROP COLUMN `voted_last_primary_5` [nativecode=1091 ** Can't DROP 'voted_last_primary_5'; check that column/key exists]"]
)


Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Cannot delete custom field
August 12, 2009, 06:50:29 pm

can you reproduce this on our sandbox server: http://sandbox.civicrm.org/

if you can reproduce, please file an issue with detailed instructions on how to reproduce / see the problem on sandbox

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Cannot delete custom field

This forum was archived on 2017-11-26.