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) »
  • Relationships disabling
Pages: [1] 2

Author Topic: Relationships disabling  (Read 3428 times)

ryeradio

  • I post frequently
  • ***
  • Posts: 185
  • Karma: 1
  • CiviCRM version: 4.2.1
  • CMS version: Drupal
  • MySQL version: MySQL5
  • PHP version: PHP5
Relationships disabling
May 31, 2012, 02:57:28 pm
I have a contact with an employee relationship. When I go in to edit that contact like update an address or phone number and save the contact the relationship automatically disables. Do you know why this would be happening? Is this possibly a bug?


Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Relationships disabling
May 31, 2012, 04:39:33 pm
Certainly shouldn't be doing that AFAIK. I just did a quick test on my 4.1 install and didn't see that happening. Please try and recreate the behavior your seeing on the public demo. If you can recreate it, then you can file a bug report on the issue tracker with detailed steps as to how to recreate. At that point, would be good if you can also investigate the cause / problem code and submit a suggested patch.
Protect your investment in CiviCRM by  becoming a Member!

ryeradio

  • I post frequently
  • ***
  • Posts: 185
  • Karma: 1
  • CiviCRM version: 4.2.1
  • CMS version: Drupal
  • MySQL version: MySQL5
  • PHP version: PHP5
Re: Relationships disabling
June 03, 2012, 07:08:01 pm
It is very strange, because it only seems to be happening with contacts that I have imported and not new contacts. Then once you have gone in and edited and then enabled their relationship again, it does not happen anymore. But every time I go into edit an imported contact for the first time, their relationship disables. This seemed to have started with the 4.2 upgrade :(

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Relationships disabling
June 04, 2012, 01:23:55 am
Hi,

Could you check if the current employee fields are set on the imported contacts?

employer_id & organization_name should contain the same value as the current employer

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

ryeradio

  • I post frequently
  • ***
  • Posts: 185
  • Karma: 1
  • CiviCRM version: 4.2.1
  • CMS version: Drupal
  • MySQL version: MySQL5
  • PHP version: PHP5
Re: Relationships disabling
June 15, 2012, 10:20:39 am
There were some that did not have a current employee and organization name, so I went in and updated those. But that seems to be the problem. If the current employee is updated in an individual contact record and then I go in to edit a record, it is not there anymore and then it disables it after I click on save. This seems like a bug to me. Is there a quick fix at all for this?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Relationships disabling
June 15, 2012, 10:44:13 pm
Not a bug, feature.

If you edit a contact and remove her current employee, it is normal it stop the relatiinship

IMO the bug is in the import and setting the relationship should set the current employee too. Could you try fixing?
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

ryeradio

  • I post frequently
  • ***
  • Posts: 185
  • Karma: 1
  • CiviCRM version: 4.2.1
  • CMS version: Drupal
  • MySQL version: MySQL5
  • PHP version: PHP5
Re: Relationships disabling
June 20, 2012, 04:54:17 am
That is where the problem is. When I edit the contact of an individual that has a current employer, the current employer goes away. So I can pull up an individual, see that they have been assigned a current employer. But when I go into edit mode, that current employer is not there anymore. So if I do not add that back in, then the relationship disables. Why is the current employer going away on edit mode?

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: Relationships disabling
June 20, 2012, 12:57:14 pm
how were these relationships created in the first place?
can you take a look in the db at an example before and after?
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

ryeradio

  • I post frequently
  • ***
  • Posts: 185
  • Karma: 1
  • CiviCRM version: 4.2.1
  • CMS version: Drupal
  • MySQL version: MySQL5
  • PHP version: PHP5
Re: Relationships disabling
June 20, 2012, 02:34:12 pm
Sure if I look at the contact table the organization_name is populated and the employer_id is populated. There is also a relationship in the relationship table. Then I go in and edit the contact. I just removed a middle initial. The employer was not showing on the edit screen and when I saved it the organization_name and employer_name were null. Is there a piece I am missing somewhere?

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: Relationships disabling
June 20, 2012, 02:45:09 pm
not sure - how were these records/relationships created - just via the UI or from an import or somesuch?
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

ryeradio

  • I post frequently
  • ***
  • Posts: 185
  • Karma: 1
  • CiviCRM version: 4.2.1
  • CMS version: Drupal
  • MySQL version: MySQL5
  • PHP version: PHP5
Re: Relationships disabling
June 20, 2012, 02:51:52 pm
Through the UI. I just went into the same record, added the current employer back in and saved. Then I went back to edit it changed another field, saved and it is gone. It also disables the relationship as well.

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: Relationships disabling
June 20, 2012, 11:25:15 pm
this all sounds pretty bizarre and nothing i have come across, sorry not to be much help
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

ryeradio

  • I post frequently
  • ***
  • Posts: 185
  • Karma: 1
  • CiviCRM version: 4.2.1
  • CMS version: Drupal
  • MySQL version: MySQL5
  • PHP version: PHP5
Re: Relationships disabling
June 21, 2012, 10:33:01 am
Anyone else have this happen to them? This is causing a lot of problems because every time we edit a contact it disables their current employment:( What file loads the data onto the edit screen? Is there something missing that is not loading the current employer field in edit mode?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Relationships disabling
June 22, 2012, 07:09:10 am
Wondering whether the AJAX call which retrieves the existing Current Employer info is failing for some reason when the edit form is loading.

You may be able to get a clue using Firebug extension on Firefox. Install and enable Firebug if you don't have it already. Then
- open firebug and select Console
- go to Edit form for a contact that has a current employer showing in Contact Summary
- you should see several GET url's in the console, one of which is retrieving the current employer - looks like this in my local sandbox:

http://civicrm42/civicrm/ajax/rest?className=CRM_Contact_Page_AJAX&fnName=getContactList&json=1&context=contact&org=1&id=103&employee_id=102

If you right-click that link, it should open in a new tab and you should see the value being returned like this (employer_name|contact_id):

CiviCRM LLC|103

or you might see an error which would be a clue.
Protect your investment in CiviCRM by  becoming a Member!

ryeradio

  • I post frequently
  • ***
  • Posts: 185
  • Karma: 1
  • CiviCRM version: 4.2.1
  • CMS version: Drupal
  • MySQL version: MySQL5
  • PHP version: PHP5
Re: Relationships disabling
June 22, 2012, 10:25:06 am
Thank you! I do see an error when I load the page and I am looking at the console it says cid is not defined. The link right after the error looks like your link below. What do I need to change?There is also an error before that that says var checkSimilar = ; Not sure if that has anything to do with this error? Thanks so much for your help Dave!

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Relationships disabling

This forum was archived on 2017-11-26.