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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrade from 4.3 to 4.4 Relationship Issues
Pages: [1]

Author Topic: Upgrade from 4.3 to 4.4 Relationship Issues  (Read 588 times)

richardb

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.3 - 4.4
  • CMS version: Drupal 7.23
  • MySQL version: 5.5
  • PHP version: 5.3
Upgrade from 4.3 to 4.4 Relationship Issues
October 25, 2013, 04:52:51 pm
Hello

I just upgraded our CiviCRM from 4.3 to 4.4 and have noticed a couple of problems with our membership system.  I have come up with workarouds for both of these, but they are probably not ideal solutions.

Our family memberships use relationships (spouse of, parent of) to extend membership to additional family members.  Initially, a user creates a family membership through a standard CiviCRM contribution page which also creates a Drupal user for the primary member.  Once the membership is active (after the appropriate fee is paid), the logged in member can then submit a Webform that creates or updates other family members.  This webform uses the Webform CiviCRM module to create CiviCRM contacts and the appropriate permissioned relationships.  This works as expected in 4.3, i.e. the contacts and relationships are created and the membership is extended to the related contacts.  After upgrading to 4.4 there are a couple of problems with this workflow.

1. With 4.4, submission of the form creates the contacts and permissioned relationships but the membership is not extended to the new contact.  In order to get the membership extended, I have to edit the original user's membership record and save it.  Looking through the code, it appears that the difference is that, in 4.3, the function civicrm_api3_relationship_create() that creates the relationships (in api/v3/Relationship.php) has a call to CRM_Contact_BAO_Relationship::relatedMemberships() that creates or updates the memberships.  This call is not in the 4.4 version of the api code and I could not find anyplace else in the flow where it would be called, so I think the memberships are not getting updated.  I put this function call back in the api code for 4.4 and that seems to have fixed my immediate problem.  However, there is probably a good reason this code was taken out of the 4.4 api function, so my solution is probably not the best.

2. We use Webform-CiviCRM's autofill ability to prefill fields of existing related contacts in the above form and also to provide a select list of related family members to choose from for signing up for some of our programs.  In 4.3 I had to install the Related Permissions extension to make this work and it appears that it is necessary for 4.4 also.  However at present, the Related Permissions extension does not seem to have a 4.4 version.  As an experiment I took the 4.3 version, updated the info.xml file to include 4.4, and installed it on our system.  So far I haven't noticed any problems with what we are using it for and it appears to have fixed the problem, but I will be watching for a new version of this extension.

I'm sure the above workarounds are not good long term solutions, so any suggestions would be appreciated.

Thanks


Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Upgrade from 4.3 to 4.4 Relationship Issues
October 25, 2013, 10:14:17 pm
You did upgrade Webform-CiviCRM to version 4 right?
If you can confirm that the relationship permission extension works in 4.4 without problem then Eileen or I can go ahead and mark it as compatible with 4.4. Makes sense that it would be since not much has changed in core to affect it.
Try asking your question on the new CiviCRM help site.

richardb

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.3 - 4.4
  • CMS version: Drupal 7.23
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Upgrade from 4.3 to 4.4 Relationship Issues
October 26, 2013, 10:46:13 am
Yes...I am running webform-civicrm-7.x-4.0-beta5 and the relationship extension is working as it did before.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrade from 4.3 to 4.4 Relationship Issues

This forum was archived on 2017-11-26.