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 CiviMember (Moderator: Deepak Srivastava) »
  • "On Behalf" renewal fields auto-populating with wrong data
Pages: [1]

Author Topic: "On Behalf" renewal fields auto-populating with wrong data  (Read 336 times)

poorhaus

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
    • Music Nova Scotia
  • CiviCRM version: 4.4.10
  • CMS version: Drupal 7
  • MySQL version: 5.5.27
  • PHP version: 5.3.17
"On Behalf" renewal fields auto-populating with wrong data
February 19, 2015, 11:56:33 am
CiviCRM 4.4.10 + Drupal

For our use-case, only Organizations are the primary holders of memberships; Individuals always inherit them from Orgs they have an "employee of" relationship to.

Organizations in our case are bands/companies/groups, and individuals can belong simultaneously to multiple organizations. Each logged-in member gets a sidebar that shows all the Orgs they belong to, with options to do things like edit their details and renew their membership.

Right now, I'm composing the renewal links as such: http://musicnovascotia.ca/civicrm/contribute/transact?reset=1&id=1&mid=(ID of membership to be renewed)

Currently, when users with multiple Org relationships click on any of the renewal links, conflicting data is displayed in the "On Behalf Of" part of the renewal form. When the form is rendered, the On Behalf Of organization drop-down is correctly populated with the names of the organizations the user is an Employee Of. The correct Organization pertaining to the membership ID in the link is also selected in the drop-down, but the rest of the fields are incorrectly populated with the particulars from another Org the user is an Employee Of. Strangely, the On Behalf form field values appear to get populated correctly at first, but in a split second are then overwritten with the wrong values from a different Org.

If you leave the rest of the fields unchanged and go ahead with the renewal, the confirmation screen that follows shows the name of the org whose details were mistakenly inserted into the fields when the form was first loaded, as opposed to the org whose renewal link you clicked on. 

If you first drop down the list of orgs the user belongs to and select a different one, the On Behalf form fields are populated with the correct values pertaining to the org that you've selected. To get the fields to populate correctly for the org the link was composed for, you have to select a different org from the list, then select the correct one again. Once you take this additional step, if you continue with the renewal the correct Org name is displayed on the confirmation screen. 

I don't think it's a CiviCRM permissions issue; all the relationships in question have the appropriate permissions, and I am still able to access the org's info, it just takes a few extra clicks. I've also tried messing with the "Current Employer" value for the user I'm testing with, but it doesn't change the outcome. jQuery issue maybe? I've attached some screenshots that I hope will make the problem clearer; form field values that are correct are highlighted in green, wrong ones in red.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • "On Behalf" renewal fields auto-populating with wrong data

This forum was archived on 2017-11-26.