referral link is sometimes displayed incorrectly

subtlearts - October 3, 2009 - 13:29
Project:User Referral
Version:5.x-1.x-dev
Component:Code: referral
Category:bug report
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

Hi, I am using User Referral along with Userpoints, and I have an interesting new issue: the referral link is occasionally, not always, displayed wrong - as all 7's, e.g. www.site.com/referral/777777xx (where xx is something in hex code). When this happens, it seems to be the case for a few minutes for all users, and then it sorts itself out and goes back to displaying the right codes again. The all-7 codes do not work, i.e. do not result in storing the cookie, or in any case points are not awarded as they usually are when the correct codes are used.

I don't know what makes them reset to the proper codes, possibly a cron run? I sometimes have to log out and in again a few times before it gets set right again.

I confess I have mucked about in the code somewhat, transferring the call to userpoints to the login_toboggan module so that it is called when the new user validates, rather than immediately; however these were minor changes and they are working, and in any case I don't see why it would interfere with the referral module displaying the proper code on the user page, or (even more mysteriously) why it would do this only intermittently. However, I did not notice this happening before I installed the login_toboggan module. Possibly a conflict in there somewhere?

any suggestions? anyone seen this?
thanks in advance...

#1

subtlearts - October 16, 2009 - 09:19

nobody with anything to say about this at all? Any ideas as to why referral would occasionally churn out a completely bogus referral code? please?

#2

kbahey - October 16, 2009 - 14:16
Status:active» postponed (maintainer needs more info)

The calculation that generates a referral code uses the $base_url variable.

Maybe your site does not have $base_url configured in settings.php AND you don't have your web server redirecting example.com to www.example.com? In this case the calculation of the referral code will be wrong.

Try adding it to your settings.php and see if that works.

#3

subtlearts - November 1, 2009 - 00:32

Thanks, I have installed those fixes, and will test to see if the behaviour persists.

 
 

Drupal is a registered trademark of Dries Buytaert.