1

I added a custom field for authenticated users to add a bio on their profile page (and if there's an existing field I should use for this, please let me know). Not knowing how long I should make this field, and temporarily forgetting that mysql probably uses fixed-width for this, I set the field length to 32767.

It took a long time to create the field, but the page wait dialog finally completed and the field shows up in the Custom Fields list. But having seen the long wait, I decided to re-do the field at 4095 or 8191, and tried to delete the Bio field. THAT progress window has been a spinning blue circle for nearly an hour, and Bio is still showing up in the Custom Fields list in a different tab.

EDIT: perhaps worth noting that the page where I created the field also had a spinning wait cursor nearly 90 minutes after I did so, but I could see the Bio field as expected in the Custom Field list, so that process seems to have completed without letting the page know.

Did I break something, or will this get to my desired state after I wait long enough? This is running on a Linode at $20 a month, so the CPU/RAM is not particularly powerful.

1
  • A $20 Linode should have sufficient grunt
    – petednz - fuzion
    Commented Nov 3, 2019 at 22:21

2 Answers 2

1

You haven't said what field type you were using, but I think you should probably be using a note field rather than an alphanumeric. My understanding is that the note field isn't stored as fixed length.

1
  • Yes, when I redid this with a new field, I spotted the Note option and used that. No problems there. Just didn't equate that with "variable length field" the first time around. Commented Nov 4, 2019 at 4:00
0

Agree with Mick Kahn about using a note. As to the spinning cursor and deleting the field if you're unable to do it in the UI, the spinning cursor usually means a fatal error occurred somewhere, so check the web server logs or CiviCRM ConfigAndLog. To delete the custom field manually:

  1. Make a database backup.
  2. In the list of custom fields if you hover over or click the edit link for the field the url will have id=something in it. Let's say it's id=4.
  3. Do select custom_group_id,column_name from civicrm_custom_field where id=4;
  4. Let's say it shows 7 and bio_4.
  5. Do select table_name from civicrm_custom_group where id=7;
  6. Let's say it shows civicrm_value_something_7.
  7. Do alter table civicrm_value_something_7 drop column bio_4; NOTE: I think the field was never actually created in the physical table, so this may say "not found" or something. The original create likely had a fatal error Column length too big for column which is why you see the spinning cursor. So if it says not found just keep going.
  8. Do delete from civicrm_custom_field where id=4;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.