Closed (fixed)
Project:
Drupal Association Project(s)
Version:
6.x-3.0
Component:
CiviCRM
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Jul 2012 at 21:29 UTC
Updated:
20 Dec 2012 at 19:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
digitalfrontiersmediaAs another note, the badge used to show up here as well:
http://drupal.org/user/106070
Could the problem be that manually entering does not trigger the procedure that places the badge on the profile? Essentially meaning that the only way without re-purchase would be to fiddle with the database?
Comment #2
digitalfrontiersmediadrupalorg_has_civimembership MUST return TRUE for the badge to display, but it doesn't. Could it be that it's not returning TRUE because the function is expecting to be passed $account as a parameter instead of $organization?
Its call:
drupalorg_has_civimembership($organization, 'Organization') <-----passing in $organization
where earlier it is declared: $organization = node_load($nid); <----- a node
versus the actual function:
function drupalorg_has_civimembership($account, $type) { <-----expecting to be passed $account
return (bool) db_select('drupalorg_civimembership', 'dc')
->fields('dc', array('user_name'))
->condition('user_name', $account->name, '=') <------ a user
->condition('membership_type', $type, '=')
->range(0, 1)->execute()->fetchField();
}
The above is obviously being invoked since the Current Company logo/link does indeed show up on my user profile page. The below SHOULD add the badge and a "We're a member/Join Us" link but it does NOT. It depends on the IF determining if we have an 'Oraganization' civimembership (and if the parent IFs are TRUE, of course) to add the badge to the $content['column_2']['membership'] array.
The below is being invoked and adding a personal ("Individual") membership message/link (when viewing the profile while logged in as myself) to the $membership_personal variable.
Below, the $membership_personal variable (holding the personal ("Individual") membership message/link) is added to the same $content['column_2']['membership'] array that the badge was supposedly added to above. The difference being that the personal ("Individual") membership message/link is actually being displayed and is visible on the page but the badge is NOT. Thus, it appears that the function drupalorg_has_civimembership($organization, 'Organization') is returning FALSE and therefore never adding the badge to the page. This would coincide with your observation that my profile shows no indication of a membership at all.
Out of curiosity, am I the only person/organization reporting this problem?
The above code discrepancy MUST be affecting others.
Comment #3
digitalfrontiersmediaOn second look, I guess this would still work if $node->name is set. Question is: is it?
I also notice some individual badges don't seem to display correctly ( http://drupal.org/user/64383 ). Seems there are a few problems going on here.
Comment #4
lizzjoyAnother example. A current Individual member purchased an Organization membership on July 14. The system attached the Org. payment to the current Ind. membership and changed the level to Org. It should have created a new membership record for the Org. membership. I tried to add the Ind. membership back into the CRM and it does not appear in the Membership record. This cannot be fixed in the CRM. http://drupal.org/user/1144180
Comment #5
lizzjoyI'm changing the title of this issue for clarity.
Renewing members buy their memberships and the data is incorrect in the CRM. It is affecting display of the badges and member statuses on profiles.
Example: Individual member decides to also buy an Organization membership. Makes purchase. In the data, the individual membership is overwritten with the new contribution. So one membership disappears and then the new contribution and new Org. membership does not show up on the profile.
Image attached for clarity.
Comment #6
digitalfrontiersmediaHi Lizz,
Sorry you did not make it to Munich. Was hoping to touch base with you and possibly a dev on this while here but heard you stayed in New York. In lieu of that, Any update on this issue or ideas on who might be able to look at this? Anymore I can do to help?
Comment #7
drummhttps://association.drupal.org/api/association_members.json has the username truncated
"user_name":"DigitalFrontier...". We should update the view to not do that, re-export the feature, etc, deploy.Dev sites aren't helpful for this, we have to do CiviCRM on staging. CiviCRM won't be on dev since it is full of personal information.
Comment #8
twardnw commentedInteresting, the view in question has nothing set to actually truncate the username
Comment #9
lizzjoyAdding another example to this issue: http://drupal.org/user/1201508
The transaction and record look fine in the CRM, but no record on Drupal profile of the Org. membership
Comment #10
twardnw commentedI think I've got this solved :) The JSON feed plugin for Views was truncating the usernames, and my setting for the Membership type was cutting off 1 character too soon.
Searching through the JSON file from the view for
'membership_type" : " 'comes back with no results now, which means that every user listed has a membership type show properly. Previously it was coming showing "" for USD organization members.Comment #11
digitalfrontiersmediaExcellent work. Confirming that this is indeed fixed on my profile!
Comment #12
shyamala commentedThough the organisation membership badge and individual membership badge is now displayed on my profile. It still doesnot dispaly on my colleagues profiles. List of colleagues can be viewed by clicking the company name on my profile or visiting http://drupal.org/profile/profile_current_company_organization/UniMity%2....
Is it something wrong that I am doing or is it a bug?
Comment #13
avpaderno@Shyamala I see it.
Comment #14
shyamala commentedAdded my organisation to the Drupal market place and it started showing up. SO yes it's working for me now.
Prior to adding the organisation to the market place, I was facing this issue.
Thanks
Comment #15
avpadernoComment #16
lizzjoy+1 to Infinity.
Thanks very much.
Shyamala - I see you found the solution by having the listing here http://drupal.org/node/1817376
Any employee who chooses to list your company as their Current Employer in their Drupal.org profile will show up in this node and will also get the badge because it appears on the node.
Thanks for making my weekend.
Comment #18
tvn commentedComment #19
lizzjoyWe need to make a change in CiviCRM to prevent the overwriting of memberships. This is not about badges, but is about renewal transactions causing the problem.
If a person has ever had an Individual Membership and they purchase an Organization Membership, the new purchase overwrites the old one. This is unacceptable for any member who is a current Individual Member buying also for their Org.
This can be fixed, but I need someone with direct access to the Civi database to coordinate with me so I can move Org. Memberships to a new Civi organization (ID 236678) and then you run a query to move all the existing Organization Memberships into this new Civi organization.
This will prevent future overwriting and allow for fixing of currently overwritten memberships to begin.
Comment #20
digitalfrontiersmediaThis issue has regressed as the badge which previously was fixed and appeared on my account has again disappeared:
http://drupal.org/user/106070
Comment #21
avpadernoThis is why the current status is needs work: because somebody needs to work on this.
;)Comment #22
digitalfrontiersmediaSorry. I reset it since #19 seemed to indicate work needed to be done in a different area for a more robust fix without mentioning (or possibly even realizing) that the original issue had re-expressed itself, i.e. one might be under the impression that the original issue was solved but that further work was needed when I just wanted to point out that in fact we're still at the same point where we started 5 months ago.
I changed status since http://drupal.org/node/156119 states that the "Active" status...
Sorry for being too aggressive with it.
Comment #23
twardnw commentedthe 'Link this field to its user' setting on the user_name field of the view seems to have been the cause of this. When I inspected the view it was checked, clearing it removes the shortening of that field. DigitalFrontiersMedia, I checked your profile, the badge is being displayed properly.
Comment #24
digitalfrontiersmedia@twardnw, as you say. It is indeed back. Thank you!
Comment #25
twardnw commented#1859410: Update organization memberships with new membership organization
dealt with the original problem for this issue. New org memberships will now be associated with a different 'membership organization' and will prevent them from being over-written and thus not displaying the correct badge.
Closing this one out, if you have problems with your badge again, please open a new issue.