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) »
  • Issues with Custom Data Date Fields
Pages: 1 [2]

Author Topic: Issues with Custom Data Date Fields  (Read 2804 times)

Hardwick

  • I post frequently
  • ***
  • Posts: 124
  • Karma: 1
  • CiviCRM version: 4.0.5
Re: Issues with Custom Data Date Fields
May 10, 2012, 05:32:36 am
Thanks Hershel, if I understand correctly, in that scenario, the only existing path (in 4.05) would be to add a new (named) field to a new group or custom data set, then use an existing set of multiple choice options ( for example, the ones already created for county names), then delete the other (old) field.

But the issue we keep running into is deleting the old field generates the error, and then there's no way to add the new field to the database because it keeps saying it's already there.

Presumably you could slightly alter the name though, for example to "Member_County" instead of "County" and employ the existing multiple choice set, is that right? This is presuming the spreading of multiple custom data fields (with many options) over different groups is the solution here.

The choice seems to be either that or we redo the existing data set up and start from a brand new install. However if that doesn't work, and we hit the limitation, it risks losing more time and bumping into the same issue...there may be no way to know for sure...however it sounds like your and others database is quite large, and that the issue extends beyond date fields or at least is not inherent to them.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Issues with Custom Data Date Fields
May 10, 2012, 05:36:46 am
Quote from: Hardwick on May 10, 2012, 05:32:36 am
Thanks Hershel, if I understand correctly, in that scenario, the only existing path (in 4.05) would be to add a new (named) field to a new group or custom data set, then use an existing set of multiple choice options ( for example, the ones already created for county names), then delete the other (old) field.

Yes

Quote from: Hardwick on May 10, 2012, 05:32:36 am
Presumably you could slightly alter the name though, for example to "Member_County" instead of "County" and employ the existing multiple choice set, is that right? This is presuming the spreading of multiple custom data fields (with many options) over different groups is the solution here.

Correct. The site I have does just that because they have the same named field in several groups.

If deleting a field fails, you could try manually. You must remove the record in the table civicrm_custom_field and then the field itself from the custom data table.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Hardwick

  • I post frequently
  • ***
  • Posts: 124
  • Karma: 1
  • CiviCRM version: 4.0.5
Re: Issues with Custom Data Date Fields
May 10, 2012, 11:18:43 am
ok, so we will try :

1. create slightly altered "copies" of existing custom data fields (which will allow us to place them in new custom data groups

2. use multiple choice options attached to the existing field sets

3. go until we hit the limit then go to new custom data set

4. if none of this works, start from scratch by copying previously working tables/dbase over

IN this way we'll try to avoid the error moving forward..thanks, H

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: Issues with Custom Data Date Fields
May 10, 2012, 11:47:34 am

hmm, i think if u get to point 3, civicrm is already hosed with regard to that table. U'll then need to manually delete the custom field from the database

ideally, we should detect the error and if an errror occurs, basically not make any changes. If you have developer resources would be great if you can get them to look at this, might not be too hard. We can help them get started (the code is fairly localized)

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

Hardwick

  • I post frequently
  • ***
  • Posts: 124
  • Karma: 1
  • CiviCRM version: 4.0.5
Re: Issues with Custom Data Date Fields
May 10, 2012, 12:06:16 pm
ok guys, we're working it now..will report back asap...thanks for all the assistance!

Hardwick

  • I post frequently
  • ***
  • Posts: 124
  • Karma: 1
  • CiviCRM version: 4.0.5
Re: Issues with Custom Data Date Fields
May 11, 2012, 02:39:41 pm
As we are re-creating the fields, just noticing that we have a notes field with no set parameters, ie height, column height ...Peter had mentioned something similar in an earlier reply -- is a notes field something that would break a table? any one have an idea what the optimal or maximum height/width should be?

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Issues with Custom Data Date Fields
May 11, 2012, 03:05:00 pm
yes lots of Notes fields can be a problem but it isn't the height/width size issue afaik - just that if they get more than a certain number of characters - read my earlier link for details
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Hardwick

  • I post frequently
  • ***
  • Posts: 124
  • Karma: 1
  • CiviCRM version: 4.0.5
Re: Issues with Custom Data Date Fields
May 11, 2012, 07:31:51 pm
well, things have taken a turn for the better!! We created new custom data duplicate fields, ie, field_duplicate for each one. We still can't delete the old ones (which are of type "contact") in the offending "members" custom data set, as we get this ugly error for each of the "non-deletable" old fields : ""DROP COLUMN `cdla_issued_73` [nativecode=1091 ** Can't DROP 'cdla_issued_73'; check that column/key exists]"

(point of note : cdla is the name of the particular license for which we need such date fields, and we get the error for each of the old fields)

However, doing an import into the new custom data groups (sets) of license fields, grouped more modestly in terms of their overall number of fields actually works (!) thanks to the advice above

This means that it may be possible (?) to simply leave the previous offending fields there and not delete the whole data set  -- which would mean we can preserve about 2200 records or so that have all sorts of related member info in there. Of course if we have to reimport everything we will.

I should also note that other non-license fields in the offending set CAN be deleted.

So does anyone think we can get away with just manually deleting (in the dbase) the offending custom data fields and leaving the other fields that seem to be "non-corrupted" in the offending group...we want to save work but obviously don;t want to leave the client a loaded minefield of potential bad code  ;D

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Issues with Custom Data Date Fields
May 12, 2012, 12:49:58 pm
Quote from: Hardwick on May 11, 2012, 07:31:51 pm
So does anyone think we can get away with just manually deleting (in the dbase) the offending custom data fields and leaving the other fields that seem to be "non-corrupted" in the offending group...we want to save work but obviously don;t want to leave the client a loaded minefield of potential bad code  ;D

Should be OK.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Hardwick

  • I post frequently
  • ***
  • Posts: 124
  • Karma: 1
  • CiviCRM version: 4.0.5
Re: Issues with Custom Data Date Fields
May 12, 2012, 01:08:01 pm
So far so good with this, thanks for all the help above. As of now, we've simply disabled the offending fields, created duplicates and spaced them out over 4 groups and successfully imported the custom data (all date fields) in. this allowed us to leave the already migrated info in the previously imported members fields.

For the moment we'll hold off on any additional manual deleting in the database, which may be somewhat a roll of the dice but things appear stable so why mess it, at least until we stumble again.

Strangely, we never hit any kind of limit with the characters in the notes, though we had a lot of them, knock wood.  We've got some additional membership stuff to configure, but as of now looking good. thanks again everyone who offered assistance...H

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Issues with Custom Data Date Fields

This forum was archived on 2017-11-26.