Hi, everyone.
I want to track referrals, there is affiliate which can help me, but there are some problems.
My test environment XAMPP on localhost.
I show a url http://localhost/drupal/dp68/?a=3&k=jason in my blog, The user jason uid=3 and making Affiliate Enabled.
But nothing was log when click http://localhost/drupal/dp68/?a=3&k=jason, what is the problem about affiliate. there are no log in my database.
Comments
Comment #1
Mamouri commentedI have same problem
Comment #2
rj commentedSame problem, subscribing.
Comment #3
aangel commentedHmmm, I know this is quite a statement, but I don't think this version has actually been tested on Drupal 6.x. Or perhaps the wrong code was uploaded.
The reason I say that is because the call to affiliate_record() is still in hook_menu() when for Drupal 6 it needs to be in hook_init().
hook_menu() in Drupal 6 is called now only when the menu is being rebuilt. Thus, during normal operation, the code to record the incoming affiliate uid is never called.
I removed affiliate_record(); from affiliate_menu(), then moved it to a new function:
Now it is being called, but other things aren't working. Still investigating...
Comment #4
Lem-2 commentedAgreed, 6.x-1.3 just does not work. Arrived independently at the same conclusion as aangel.
I applied the fix, and it appears to work. I am curious what "other things" he found to be broken- my quick testing did not reveal anything, but I was not very rigorous.
Comment #5
lark commentedWhy its state is recommended?
It isn`t work at all!
Comment #6
sikjoy commentedaangel is correct. The hook_init() is the proper place to call affiliate_record().
Drupal 6 only calls hook_menu() on each page load if caching is turned off.
Comment #7
sikjoy commentedPerhaps it was tested with caching disabled. That's the only way I can see that it would work in it's current state.
Comment #8
aangel commented