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) »
  • Can't edit Relationship Custom Data Group
Pages: [1]

Author Topic: Can't edit Relationship Custom Data Group  (Read 1438 times)

ericaordinary

  • Guest
Can't edit Relationship Custom Data Group
June 14, 2010, 07:44:07 pm
Hi all,

I created a new Custom Data Group for a Relationship, and when I went back into it to edit the Group Name it came up with the message:

Please correct the following errors in the form fields below:
Removing any existing subtypes is not allowed at this moment. However you can add more subtypes.


I haven't removed any subtypes from the list, simply changed the name of the Group.

In addition, when I try to add a new subtype to the already existing set of subtypes I get the same message when I go to save the Data Group.

I tried in a couple of browsers (Opera, Firefox and Safari) and still got the same message.

I replicated it on the demo site and it worked with no problems.  Any ideas what could be wrong with my install?

Cheers,
Erica.


ericaordinary

  • Guest
Re: Can't edit Relationship Custom Data Group
June 14, 2010, 09:25:04 pm
After some IRC discussion with Lobo I played around on the demo site a bit more.  I didn't see the same issue, but a similar (posibly related) problem occurred on there:

1. Created Custom Data Group (called Relationship Details) used for Relationship, selected sub type "Child of"; saved.

2. Added Alphanumeric Custom Field to Group called "Parenting Strategy"; saved.

3. Went back to settings of Relationship Details Data Group and changed title of Group to Relationship; saved, which worked unlike on my own install.

4. Went to settings of Data Group again and selected sub type "Parent of" in addition to "Child of" already selected; saved.

5. Checked http://drupal.demo.civicrm.org/civicrm/admin/custom/group/?action=browse and noted that "Type" of my Group was "Child of, Child of" not "Child of, Parent of" as selected when I edited the settings.

6. Went back into settings of Data Group and only "Child of" is selected in the list of sub-types, "Parent of" not selected at all.

Cheers,
Erica.

ericaordinary

  • Guest
Re: Can't edit Relationship Custom Data Group
June 14, 2010, 09:43:37 pm
FYI, some further playing around on the demo site and I've found you can still access the Custom Data Group fields when viewing the relationship from either the child or parent records, so it seems to be working for both Child of and Parent of types, just doesn't look like it on the Custom Data Group summary or settings page.
« Last Edit: June 14, 2010, 09:45:38 pm by ericaordinary »

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Can't edit Relationship Custom Data Group
June 15, 2010, 06:06:49 am
Erica,

Did some research today, and looks you are right in the sense that its related to child-of/parent-of. Here is what's happening -

1. Child-of and Parent-of are basically same relationship type but different directions a->b and b->a. And since custom groups just record the type id, the same id is recorded twice.

2. Now you go and edit a relationship whose type is child/parent-of. And even if you save the relationship without any custom info it creates an entry in the custom table with empty values.

4. On custom group settings screen, the policy/rule is to NOT allow removing any subtypes, if there is already some entry (even with null / empty values) in the custom table for a particular used-for field (e.g relationship here).
And i suspect you already have some, and one solution is to empty the custom table.

5. When custom group settings form loads with only one relationship type selected i.e child of since id is same (for both child & parent) and when you hit save, form detects that there were two ids initially and thinks that you trying to remove one subtype (when there is already some entry present in the custom table) and therefore throws that error.

So there are two issues -
#5 -> where solution could be - making child of & parent of (same rel type) appear in same row in the subtype selector e.g "Child Of / Parent Of". Please file an issue for this.

#4 -> empty values being considered as data present. This is not a simple / clean fix.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

ericaordinary

  • Guest
Re: Can't edit Relationship Custom Data Group
June 15, 2010, 04:48:06 pm
Thanks Deepak, created an issue here:

http://issues.civicrm.org/jira/browse/CRM-6360

I'm new to this so hopefully I've given enough information for it to be worked on.  I'm still getting my head around both Drupal and CiviCRM so it's a big learning curve.

I ended up deleting the custom group and creating it again with the right name/values in my own install, as I don't have any data yet, but for future how would I go about emptying the custom table if I come across a similar issue again?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Can't edit Relationship Custom Data Group

This forum was archived on 2017-11-26.