Closed (fixed)
Project:
Activity
Version:
6.x-2.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Sep 2009 at 08:29 UTC
Updated:
24 Feb 2010 at 16:47 UTC
I've created an action to know when a profil is updated.
When this action is executed 2 fields are created into the activity_messages table and into the activity_targets table (that's ok). When I look into Activity table I've got my record but my Uid is always to 0
45 | 0 | update | user | NULL | 1254298815
Do you have any idea ?
Best regards
Comments
Comment #1
sirkitree commentedDo you also have an activity template setup for this?
Comment #2
JulienD commentedYes I have built an activity template :
Activity publisher templates > create > user > (I checked update and my user) > wrote my descriptions > Save
Comment #3
Scott Reynolds commentedI haven't look at this problem, but the function the problem resides in is activity_record. And it deals with its drupal_write_record() to the activity table.
There it does some handling to determine if it should use global $user or not. I believe that handling is flawed.
Comment #4
Scott Reynolds commentedSetting active status
Comment #5
Scott Reynolds commentedMinor priority as the activity messages still work I believe.
Comment #6
Scott Reynolds commentedCouldn't get this to happen.
Have you tried the latest Activity2?
Comment #7
Scott Reynolds commentedNo more information provided in months and I couldn't reproduce.
Comment #8
ermannob commentedHi,
I looked into this issue, as I need to log exactly which user viewed certain nodes.
I'm not sure if my modification will make Activity work as intended, but for my needs it's ok.
activity.module:512
change
$record->uid = (!empty($context[$type]->uid)) ? $context[$type]->uid : $user->uid;to
$record->uid = (empty($context[$type]->uid)) ? $context[$type]->uid : $user->uid;Comment #9
ermannob commentedUhm.... Sorry, my code doesn't make sense...
More likely:
$record->uid = (!empty($user->uid)) ? $user->uid : $context[$type]->uid;Comment #10
Scott Reynolds commentedPlease open a separate issue as it is unrelated. In this case, the original user couldn't get a uid to record.
In your case, you want a different uid to be recorded.