Activity not tracked

Jotas - May 1, 2009 - 21:05
Project:Activity
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work
Description

Hi there,

I've followed all the steps to install this module, even this one:

"...you need to hit Save on this page for your activity messages to show up."

and I cannot track any activity (comments, user relationships, blog entries...)

I'm using Drupal 6.11 and Spanish translation.

#1

Jotas - May 2, 2009 - 09:25

I've tried changing back to English and didn't work.

I post a comment and table activity_comments remains empty... I've tried configuring a trigger but nothing happens.

By the way, if I take a look at my log, the activity is there.

Any help?

Thanks!

AttachmentSize
log.JPG 33.38 KB

#2

As If - May 5, 2009 - 22:36

Same problem. The "Activity (All)" block wasn't displaying anything, so I hit the /activity page and found nothing. So I checked all my settings on all activity types, saved them all again, and still nothing. Next I looked at my log: my updates were indeed listed there. So then I look in the "activity" table in the DB. Empty.

No upgrade was done - this was a fresh install of 6.x-1.2.

EDIT: Yes, I also hit /activity/all. Nothing.

#3

likewhoa - May 5, 2009 - 22:34

did you view the defaults activity view? /activity/all
If you created some templates at admin/settings/activity which activity types did you use with which triggers?

EDIT: n/m my questions as they meant for a 2.x activity setup. sorry

#4

As If - May 5, 2009 - 22:35

Upon further investigation, both by creating nodes and commenting on them, the function activity_insert() is never called.

#5

As If - May 6, 2009 - 02:20

I just uninstalled activity 6.x-1.2 and removed it physically from the module path. Got a whole bunch of errors after confirming the uninstall...

user warning: Table 'drupal6.activity_targets' doesn't exist query: DELETE FROM activity_targets WHERE aid IN (SELECT aid FROM activity WHERE module = 'commentactivity') in /var/www/html/sites/all/modules/activity/contrib/commentactivity/commentactivity.install on line 23.
user warning: Table 'drupal6.activity_comments' doesn't exist query: DELETE FROM activity_comments WHERE aid IN (SELECT aid FROM activity WHERE module = 'commentactivity') in /var/www/html/sites/all/modules/activity/contrib/commentactivity/commentactivity.install on line 24.
user warning: Table 'drupal6.activity' doesn't exist query: DELETE FROM activity WHERE module = 'commentactivity' in /var/www/html/sites/all/modules/activity/contrib/commentactivity/commentactivity.install on line 25.
user warning: Table 'drupal6.activity_targets' doesn't exist query: DELETE FROM activity_targets WHERE aid IN (SELECT aid FROM activity WHERE module = 'favorite_nodesactivity') in /var/www/html/sites/all/modules/activity/contrib/favorite_nodesactivity/favorite_nodesactivity.install on line 23.
user warning: Table 'drupal6.activity_comments' doesn't exist query: DELETE FROM activity_comments WHERE aid IN (SELECT aid FROM activity WHERE module = 'favorite_nodesactivity') in /var/www/html/sites/all/modules/activity/contrib/favorite_nodesactivity/favorite_nodesactivity.install on line 24.
user warning: Table 'drupal6.activity' doesn't exist query: DELETE FROM activity WHERE module = 'favorite_nodesactivity' in /var/www/html/sites/all/modules/activity/contrib/favorite_nodesactivity/favorite_nodesactivity.install on line 25.
user warning: Table 'drupal6.activity_targets' doesn't exist query: DELETE FROM activity_targets WHERE aid IN (SELECT aid FROM activity WHERE module = 'nodeactivity') in /var/www/html/sites/all/modules/activity/contrib/nodeactivity/nodeactivity.install on line 23.
user warning: Table 'drupal6.activity_comments' doesn't exist query: DELETE FROM activity_comments WHERE aid IN (SELECT aid FROM activity WHERE module = 'nodeactivity') in /var/www/html/sites/all/modules/activity/contrib/nodeactivity/nodeactivity.install on line 24.
user warning: Table 'drupal6.activity' doesn't exist query: DELETE FROM activity WHERE module = 'nodeactivity' in /var/www/html/sites/all/modules/activity/contrib/nodeactivity/nodeactivity.install on line 25.
user warning: Table 'drupal6.activity_targets' doesn't exist query: DELETE FROM activity_targets WHERE aid IN (SELECT aid FROM activity WHERE module = 'useractivity') in /var/www/html/sites/all/modules/activity/contrib/useractivity/useractivity.install on line 23.
user warning: Table 'drupal6.activity_comments' doesn't exist query: DELETE FROM activity_comments WHERE aid IN (SELECT aid FROM activity WHERE module = 'useractivity') in /var/www/html/sites/all/modules/activity/contrib/useractivity/useractivity.install on line 24.
user warning: Table 'drupal6.activity' doesn't exist query: DELETE FROM activity WHERE module = 'useractivity' in /var/www/html/sites/all/modules/activity/contrib/useractivity/useractivity.install on line 25.
user warning: Table 'drupal6.activity_targets' doesn't exist query: DELETE FROM activity_targets WHERE aid IN (SELECT aid FROM activity WHERE module = 'votingapiactivity') in /var/www/html/sites/all/modules/activity/contrib/votingapiactivity/votingapiactivity.install on line 23.
user warning: Table 'drupal6.activity_comments' doesn't exist query: DELETE FROM activity_comments WHERE aid IN (SELECT aid FROM activity WHERE module = 'votingapiactivity') in /var/www/html/sites/all/modules/activity/contrib/votingapiactivity/votingapiactivity.install on line 24.
user warning: Table 'drupal6.activity' doesn't exist query: DELETE FROM activity WHERE module = 'votingapiactivity' in /var/www/html/sites/all/modules/activity/contrib/votingapiactivity/votingapiactivity.install on line 25.

Then I installed the latest dev version 6.x-1.x-dev (datestamp = "1241308949"). Same problem as before. Activities show up in the watchdog log but not in the activity table or anywhere else.

However, this time there is a new View called "all_activity". I haven't tried modifying it yet. When I go to the associated page /activity/view, I get the same empty Activity table as before. But I also get two new errors at the top of the page:

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /var/www/html/sites/all/modules/activity/views/activity_views_plugin_row_activity_view.inc on line 16

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /var/www/html/sites/all/modules/activity/views/activity_views_plugin_row_activity_view.inc on line 16

Ok, so now I go to the View page to try and modify it, and I get the same two errors at the top of the page /admin/build/views/edit/all_activity

#6

As If - May 6, 2009 - 19:26
Component:Miscellaneous» Code
Category:support request» bug report
Priority:normal» critical

UPDATE: I reverted to my previous installation of the released module (version 6.x-1.2), since it had fewer bugs than the dev version, and I have decided to hunt for the bugs individually since there is no suitable alternative to this module.

The first submodule I examined was commentactivity.module, where I found that the main module successfully inserts ONE ROW to the activity table if I comment out the enablement check on lines 136-139. My working copy now looks like this:

// Check if both type and operation are
// enabled for activity. If not then stop here
// *** THIS IS BROKEN
// if (!in_array('comment', variable_get('commentactivity_token_types', array('comment')), TRUE) || !in_array($op, variable_get('commentactivity_op_types', array($op)), TRUE)) {
//   return FALSE;
// }
// *** END BROKEN

As I said, it now inserts a row into the db. But still no actual content is displayed publicly. The content of the "All Activity" block now looks like this when dumped via print_r:

stdClass Object
(
    [subject] => Recent activity
    [content] => <div class="item-list"><ul class="activity-list"><li class="first last"><span class="activity activity-module-commentactivity activity-type-comment activity-operation-validate"></span><span class="activity-links"> – <span class="activity-comments-click-to-show">Comment</span>  <a href="/activity/delete/1?destination=node%2F31734" title="Delete this activity record" class="activity-delete-record">X</a></span><div class="activity-comments-form-hidden clear-block"><form action="/community"  accept-charset="UTF-8" method="post" id="activity-comment-form-1">
<div><input type="hidden" name="aid" id="edit-aid-1" value="1"  />
<div class="form-item" id="edit-activity-comment-1-wrapper">
<textarea cols="60" rows="1" name="activity-comment" id="edit-activity-comment-1"  class="form-textarea resizable">

in HTML it looks like this:

– Comment 

After that one, subsequent comments do not get inserted at all.

#7

As If - May 6, 2009 - 03:13

Meanwhile, back in activity.module, when I examine the unserialized contents of $row['data'] in line 702, I find this:

Array
(
    [comment-cid] =>
    [comment-subject] => chica de mayo
    [parent-node-author-uid] => 1
    [parent-node-id] => 31736
    [parent-node-title] => Another Amazing Product
    [parent-node-type] => product
    [aid] => 1
    [uid] => 0
    [module] => commentactivity
    [type] => comment
    [operation] => validate
    [created] => 1241575778
)

Notice the comment cid is missing. When I examine the contents of the activity_targets table I see why:

a:6:{s:11:"comment-cid";N;s:15:"comment-subject";s:13:"chica de mayo";s:22:"parent-node-author-uid";s:1:"1";s:14:"parent-node-id";s:5:"31736";s:17:"parent-node-title";s:23:"Another Amazing Product";s:16:"parent-node-type";s:7:"product";}

Notice that "N" in there? Must have been inserted by commentactivity.module. I suppose it may be shorthand for "NULL" but why is my cid null? More digging to do. BRB.

#8

As If - May 6, 2009 - 04:37

In commentactivity.module, if I do a print_r($comment) at the beginning of the function commentactivity_comment($comment, $op) and then make a new comment, I get this:

Array
(
    [comment-cid] =>
    [comment-subject] => chica de mayo
    [parent-node-author-uid] => 1
    [parent-node-id] => 31736
    [parent-node-title] => Another Amazing Product
    [parent-node-type] => product
    [aid] => 1
    [uid] => 0
    [module] => commentactivity
    [type] => comment
    [operation] => validate
    [created] => 1241575778
)

The comment cid is already missing.

The same thing happens when editing an existing comment. The cid is not being reported.

#9

As If - May 6, 2009 - 19:22

For those of you following along, it seems that the activity module doesn't hear the submodules, or they fail to deliver their data to it properly. In any case, the result is that nothing ever gets written to the activity table in the DB. In a hurry, I finally resolved my problems (and got the module to work in a limited way) like this:

STEP 1. Moved the "business" functions from all desired activity/contrib modules into a custom module of my own, leaving only the following functions:
*_activity_info()
*_activityapi()
*_token_list()
*_token_values()

This was done because I knew my custom module was already recognized by the system. I just wanted the functions responsible for inserting and updating.

Specifically:

· From "commentactivity.module"
I moved commentactivity_comment() to my module, changing its name to mymodule_comment()

· From "favorite_nodesactivity.module"
I moved favorite_nodesactivity_favorite_nodes() to my module, changing its name to mymodule_favorite_nodes()

· From "nodeactivity.module"
I moved nodeactivity_nodeapi() to my module, changing its name to mymodule_nodeapi().

· From "useractivity.module"
I moved useractivity_user() to my module, changing its name to mymodule_user()

· From "votingapiactivity.module"
I moved votingapiactivity_votingapi_insert() to my module, changing its name to mymodule_votingapi_insert()

STEP 2. Edited all of the migrated functions within my own module, as follows:
· Commented out the check for type and operation - BROKEN
· Commented out the privacy setting check - DIDNT NEED IT
· Commented out the hide activity permission check - DIDNT NEED IT

STEP 3. Made the following edit to activity.module at line 501:

-   db_query("INSERT INTO {activity} (uid, module,  type,  operation,  created, data)
-                           VALUES (%d,  '%s',    '%s',  '%s',       %d,      '%s')",
+   db_query("INSERT INTO {activity} (aid, uid, module,  type,  operation,  created, data)
+                           VALUES ('', %d,  '%s',    '%s',  '%s',       %d,      '%s')",

#10

sirkitree - May 6, 2009 - 18:41

Your work here has been really good - we're currently focused on developing the 2.x branch and have limited time to maintain the 1.x branch. However, if you would like to help us out and see these changes go into the module, it would be very beneficial to us if you could start providing these changes as patches so that we can easy apply and commit the changes.

Thanks a lot for your work - and if you get a chance, I would encourage you to try out the 2.x branch which has seen a lot of structural improvements over 1.x

#11

As If - May 6, 2009 - 19:19

Thanks, Sirkitree. I wish I had time to do this in a more proper way, but right now I don't. Just wanted to leave some clues for anyone who might be in the same position as I was.

PS - With the changes noted above, all activities except favoriting are now being inserted.

#12

jaydub - May 6, 2009 - 20:19

I know you've done a lot of investigation here As If but I'm not sure that you've really isolated and addressed the problem.

I just downloaded and installed the current -dev snapshot. I did all the relevant configuration settings for Activity and for user permissions and such. I added a Page post and made a comment to it. All show up just fine in Activity.

One question that might make this more clear is to ask you whether or not you have been adding activity as the admin user (uid 1)?

There is a known issue with the admin user adding content vis a vis the 'hide activity' user permission.

Trust me the steps you've outlined in 1, 2 and 3 aren't addressing a bug, they are making the module into something different.

I urge you to double check all the permissions and activity settings and to make sure that you try adding content as a user other than the admin user and report back.

#13

jaydub - May 6, 2009 - 20:25

Regarding #6 you are confusing activity about a Drupal comment (as in not a node) with an Activity specific feature which to be able to create a comment on an Activity record. The Activity Comment is not a Drupal comment but something specific to Activity.

The commentactivity module only is concerned with the Drupal comment activity tracking.

The object you dumped via print_r and referred to in the HTML is for the Activity Comment (which could be on any form of Activity be it node, comment, user, etc activity).

#14

jaydub - May 6, 2009 - 20:27

For comment activity it would also be helpful to know whether or not you are using threaded comments or flat. Threaded are more complicated and not well tested here since they are not as commonly used in Drupal due to the complexities of handling threading.

#15

As If - May 9, 2009 - 20:38

@jaydub - Thank you for the clarification re activitycomments.

And yes, I was inserting content as user 1.

But the fact remains that the contrib modules were not successfully loading data into the DB, and now (since I made the mods described above) they are.

> Trust me the steps you've outlined in 1, 2 and 3 aren't addressing a bug, they are making the module into something different.

I'm aware of this. My methodology is not proposed as a patch or a bugfix. I'm just letting people know how I got the module to work in a way that was totally satisfactory for my (client's) purposes. YMMV.

   I hate to advocate drugs, alcohol, violence or insanity to anyone but they've always worked for me.
   - Hunter Thompson

#16

gallamine - May 9, 2009 - 15:29
Version:6.x-1.2» 6.x-1.x-dev

I have the same problem of not tracking Activity. I have tried the 6.x-1.2 release and the 6.x-1.x-dev release. I completely "uninstalled" the old activity modules and reinstalled the dev release. I went to each module's settings and hit save. I then logged in as a user other than user1/admin and made a comment, voted on a node, changed my profile and nothing shows up under "activity/all".

Any thoughts?

#17

Liliplanet - May 18, 2009 - 15:21

Yip, same problem here. Tried 6.x-2, then preferred to go back to 6.x-1.2.

Uninstalled, deleted variables, etc and still no show of any activity (:

Has anyone perhaps found the reason why this is happening?

Look forward to any reply, and thank you.
Lilian

#18

pribeh - May 25, 2009 - 20:57

My issue is similar to this this one. Just upgraded a site to D6 with Activity 1.2 (tried dev as well) and various activities are not being recorded anymore (facebook status being one) and various blocks (user & all activity ones) simply don't show up anymore. I've uninstalled and reinstalled the module again still with the same effect. Should I try rebuilding the permissions? I really don't know what's up.

Thanks again for all your hard work on this module guys.

#19

sirkitree - May 26, 2009 - 16:16
Priority:critical» normal

The basic problem here (I think, haven't tested yet) is that we do not have a complete uninstall for 6.x-2 yet. So I'm assuming that there is a variable conflict somewhere between the two.

In order to attempt to fix this, please either write a complete uninstall function for us, or you can run some SQL on your system to delete all of the variables that are set in 6.x-2. TO find these, search for 'variable_set' or looks at any keys that are used through formapi and systems_settings_form(). Compile a list of these and use variable_del() on them.

Please re-note that 6.x-2 is still in a highly active development mode and is not recommended for any sort of production use what-so-ever.

#20

Liliplanet - May 26, 2009 - 16:31

Would truly appreciate where I can find the variable sets and keys to remove/uninstall, as honestly cannot use version 1 or 2 now, and prefer to go back to 1 :)

#21

jaydub - May 26, 2009 - 17:28

assuming you can access your DB then run a query like this:

SELECT * FROM variable WHERE name LKE '%activity%';

and report what you get here.

#22

pribeh - May 27, 2009 - 18:38

Going to try this and report back tonight.

#23

pribeh - May 28, 2009 - 23:05

Fresh database and still no tracking of content with activity. Nothing in the database to suggest that it's keeping track of anything but user activity (like user joined "website"). And this is after following every step properly. I've also tried the most recent dev release. I'm going to try what As If suggests in #9 to see if that works. I need activity to work by saturday so I'll do anything.

#24

pribeh - May 28, 2009 - 23:03
Priority:normal» critical

#25

jaydub - May 28, 2009 - 23:32
Priority:critical» normal

@pribeh and others I am unsure just why you continue to have trouble here. I can pull the latest snapshot of Activity, install it on a test Drupal site, install the contrib modules, set permissions and create activity as a regular user. When doing all of this I get all the activity recording and showing up fine on the activity pages, blocks and user profile pages.

So have to ask these questions again here:

1) you have the relevant activity contrib modules installed?
2) you have set all applicable permissions?
3) you have created activity as a user other than uid 1?

AttachmentSize
activity-permissions.jpg 20.16 KB

#26

pribeh - May 29, 2009 - 03:53
Priority:normal» critical

I'm such an idiot. Ok, first time I had this problem was because I accidentally installed the 2.x-dev version which conflicted with my 1.2 version and couldn't uninstall properly. Now, after having successfully removed the database for another I accidentally clicked the "hide activity" for authenticated users. Does the "hide" permission prevent database recording of activity or simply hide it from the said user? Anyway, thanks for being patient with me jaydub. Only thing not recording now is facebook_statuses - will look into this.

#27

pribeh - May 29, 2009 - 04:07
Priority:critical» normal

K, so I'm not sure if I should file this as a different issue now but facebook_status' won't display in the activity blocks (or sections) but the activity blocks do seem to show some register of activity weirdly. They simply dry up, meaning: with every fb status update an item (other activity item) from the list disappears.

#28

mikestefff - June 5, 2009 - 20:42

oh yea wow this module doesn't even work...why is there a supported release?

#29

jaydub - June 5, 2009 - 22:31

@mikesteff have you considered the questions in #25? The module clearly works for enough people (http://drupal.org/project/usage/activity) that one can't say it's broken for all. It would be helpful if you could provide detailed information on how you are attempting to use Activity and what steps you've taken to attempt to configure and use it.

#30

jaydub - June 5, 2009 - 22:33

@pribeh regarding #27 it's likely that the fb status module has not been updated to reflect the current Activity API as fb status in the past has implemented their Activity support in the fb status module rather than in the Activity contrib modules.

#31

jaydub - June 5, 2009 - 22:34

@pribeh regarding #26 the hide activity permission for a role stops users with that role from recording an Activity record in the DB.

#32

pribeh - June 6, 2009 - 01:43

I was stupid enough to turn on "hide activity" not thinking that this might stop it form recording to the database, so when I saw no signs I was dumbfounded but you've made me see the light. As for fb_status: http://drupal.org/node/476536. And 2.0 (http://drupal.org/node/466590) support looks like it's on its way. YAH! Activity module and FB_status both rock happily together!

#33

mikestefff - June 8, 2009 - 17:01

1. Disabled and uninstalled all activity modules. Tons of database errors thrown for missing tables, etc.

2. Re-downloaded the supported v6 release. Installed and enabled.

3. Went over all of the settings pages.

4. Reviewed the permissions.

5. Logged in as a non-admin user.

6. Created a few nodes, commented on them, changed fb status, logged in and out a few times, etc.

7. No activity at all and the db is empty....

I didn't think stating all of this was necessary because what else would I have done to say that this module doesn't work...?

#34

Scott Reynolds - June 9, 2009 - 16:07

I didn't think stating all of this was necessary because what else would I have done to say that this module doesn't work...?

Its generally necessary so that we can fix whatever bug it is. Exact steps are great

Read this and become enlightened: http://www.joelonsoftware.com/articles/fog0000000029.html

#35

jaydub - June 9, 2009 - 18:27

@mikestefff do you have error reporting turned on either onscreen or in logfiles? Would be interested to know if there are any errors being thrown out that would shed light on your situation.

As Scott mentioned, we really need more information before we can solve your specific problem.

We can't know the details of your particular setup and whether or not there is something specific to your setup that is blocking Activity. When I refer to #25 as a recipe it's because the best we can do without being in front of your setup is to detail what happens with a fresh Drupal setup and CVS checkout and/or release download. What we find when we do that is Activity is working as it's supposed to. Does that mean that there are no bugs or that your problem isn't a real problem? Definitely not. To try and solve your problem though we have to look beyond what happens with an out of the box install as we've verified that out of the box is working.

I would ask you to take one of the Activity modules such as Node Activity and edit the nodeactivity.module. Go to the nodeactivity_nodeapi() function and add some debug code in to see if the hook is even being called. This would help to verify whether or not Activity is even able to record activity based on the right Drupal hooks being fired.

So maybe you can add in this:

/**
* Implementation of hook_nodeapi().
*/
function nodeactivity_nodeapi(&$node, $op, $teaser, $page) {

  // Add in debug code here
  switch ($op) {
    case 'insert':
    case 'update':
    case 'delete':

      var_dump($node);
      var_dump($op);
      exit;

If you actually get output then we know the nodeapi hook is firing. From the debug data that would be printed to the screen using the above functions, perhaps we'll find something that would indicate why an activity record is not stored.

#36

walker2238 - June 10, 2009 - 09:22

I experienced the same problem, a few times the activity would get printed but that was rare. Also to note if the activity was printed, upon page refresh the activity would be gone. I did as you requested jaydub. Atleast I think I did... it's early here. I'm thinking my specific problem as mention above was because I had previously enables activity 2 to see what all the fuss was about. here's the output.

object(stdClass)#27 (35) { ["uid"]=> string(2) "31" ["created"]=> int(1244624650) ["type"]=> string(7) "article" ["language"]=> string(0) "" ["changed"]=> int(1244624650) ["title"]=> string(46) "The theme function theme_activity_table() buil" ["teaser_js"]=> string(0) "" ["teaser_include"]=> bool(true) ["body"]=> string(2005) "The theme function theme_activity_table() builds and formats a table of individual activity records to be shown on activity pages such as the site-wide activity page found at /activity/all or users' activity at /activity/mine. The default theme implementation adds CSS classes to the table and to the table cells for the activity message, the activity timestamp and optionally an activity delete link.The theme function theme_activity_table() builds and formats a table of individual activity records to be shown on activity pages such as the site-wide activity page found at /activity/all or users' activity at /activity/mine. The default theme implementation adds CSS classes to the table and to the table cells for the activity message, the activity timestamp and optionally an activity delete link.The theme function theme_activity_table() builds and formats a table of individual activity records to be shown on activity pages such as the site-wide activity page found at /activity/all or users' activity at /activity/mine. The default theme implementation adds CSS classes to the table and to the table cells for the activity message, the activity timestamp and optionally an activity delete link.The theme function theme_activity_table() builds and formats a table of individual activity records to be shown on activity pages such as the site-wide activity page found at /activity/all or users' activity at /activity/mine. The default theme implementation adds CSS classes to the table and to the table cells for the activity message, the activity timestamp and optionally an activity delete link.The theme function theme_activity_table() builds and formats a table of individual activity records to be shown on activity pages such as the site-wide activity page found at /activity/all or users' activity at /activity/mine. The default theme implementation adds CSS classes to the table and to the table cells for the activity message, the activity timestamp and optionally an activity delete link." ["format"]=> string(1) "1" ["name"]=> string(11) "Cecilia1956" ["date"]=> string(0) "" ["status"]=> bool(true) ["promote"]=> bool(false) ["sticky"]=> bool(false) ["op"]=> string(7) "Publish" ["submit"]=> string(7) "Publish" ["form_build_id"]=> string(37) "form-33017edbc7347b36dfd155ac9e293bb2" ["form_token"]=> string(32) "391fe408bbff786cc371c9687e5b8bd0" ["form_id"]=> string(17) "article_node_form" ["comment"]=> string(1) "2" ["menu"]=> array(13) { ["mlid"]=> int(0) ["module"]=> string(4) "menu" ["hidden"]=> int(0) ["has_children"]=> int(0) ["customized"]=> int(0) ["options"]=> array(0) { } ["expanded"]=> int(0) ["parent_depth_limit"]=> int(8) ["link_title"]=> string(0) "" ["parent"]=> string(12) "navigation:0" ["weight"]=> int(0) ["plid"]=> string(1) "0" ["menu_name"]=> string(10) "navigation" } ["path"]=> string(0) "" ["taxonomy"]=> array(1) { [1]=> string(1) "4" } ["field_image"]=> array(4) { [0]=> array(3) { ["fid"]=> NULL ["list"]=> NULL ["data"]=> NULL } [1]=> array(3) { ["fid"]=> NULL ["list"]=> NULL ["data"]=> NULL } [2]=> array(3) { ["fid"]=> NULL ["list"]=> NULL ["data"]=> NULL } [3]=> array(3) { ["fid"]=> NULL ["list"]=> NULL ["data"]=> NULL } } ["teaser"]=> string(226) "The theme function theme_activity_table() builds and formats a table of individual activity records to be shown on activity pages such as the site-wide activity page found at /activity/all or users' activity at /activity/mine." ["validated"]=> bool(true) ["is_new"]=> bool(true) ["log"]=> string(0) "" ["timestamp"]=> int(1244624650) ["vid"]=> string(4) "2411" ["moderate"]=> int(0) ["tnid"]=> int(0) ["translate"]=> int(0) ["nid"]=> string(4) "2410" } string(6) "insert"

#37

arcane - June 10, 2009 - 21:44

Regarding #27, the facebook_status dev version has been updated to work properly with 6.x.1.2 I was able to to test this and verify that it is working now. Refer to: http://drupal.org/node/476536

#38

Liliplanet - June 11, 2009 - 10:14

HI,

I'm still having the same problem, after having installed 6.x-2, decided to go back to 6.x-1 (as users cannot comment, etc).

Removed all mentions via PHPAdmin, re-installed 6.x-1. Still no activity shown and permissions are correct. There are no errors in dblog.

Here are the mentions in the sql database after re-installing 6.x-1

1 match(es) inside table drupal_boxes
3 match(es) inside table drupal_cache
2 match(es) inside table drupal_cache_block
1 match(es) inside table drupal_cache_filter
26 match(es) inside table drupal_cache_form
19 match(es) inside table drupal_cache_menu
1 match(es) inside table drupal_cache_page
1 match(es) inside table drupal_cache_update
1 match(es) inside table drupal_cache_views
11 match(es) inside table drupal_menu_links
11 match(es) inside table drupal_menu_router
1 match(es) inside table drupal_node
63 match(es) inside table drupal_node_revisions
2 match(es) inside table drupal_permission
54 match(es) inside table drupal_search_datase
54 match(es) inside table drupal_search_index 
3 match(es) inside table drupal_search_total
8 match(es) inside table drupal_sessions
10 match(es) inside table drupal_system  
2 match(es) inside table drupal_url_alias  
80 match(es) inside table drupal_variable
1 match(es) inside table drupal_views_object_cache
6 match(es) inside table drupal_watchdog

Presuming there is inserts in the above that should not be there ..?

Have added the debug and receive the following:

object(stdClass)#265 (39) { ["nid"]=> string(4) "2972" ["vid"]=> string(4) "2974" ["uid"]=> string(1) "1" ["created"]=> int(1244119266) ["type"]=> string(7) "article" ["language"]=> string(0) "" ["changed"]=> int(1244714340) ["title"]=> string(49) "Hollywood workers settling in tax-friendly states" ["teaser_js"]=> string(0) "" ["teaser_include"]=> int(1) ["body"]=> string(4603) "A 25-year veteran of the film industry, William Gilpin lived in Los Angeles his entire life until he moved to New Mexico at the end of 2007. The construction coordinator works on cable network AMC's hit series "Breaking Bad," about a chemistry teacher who turns to a life of drug-dealing after being diagnosed with cancer. by Lorinda Toledo and Ryan Nakashima Like many TV production workers, Gilpin, 55, followed the jobs that left California and relocated to states that offered generous tax breaks to lure film shoots. New Mexico offers a tax rebate of up to 25 percent of qualifying production expenses, including actors' salaries. "I came here on a distant location to do a TV series, not planning to move," Gilpin said. "But I realized, you know, what a good place to be." Gilpin also said fewer competitors in the New Mexico film industry means more work for him. "In New Mexico, there's three of me in my position," Gilpin said. "In Los Angeles, there's 500." Last year, a growing number of TV and movie productions were shot in states other than California, up 2.5 percent from 2007, or 45 productions, to 1,842, according to the Motion Picture Association of America. Meanwhile, Golden State productions fell 9.3 percent, or 49 productions, to 480. The infrastructure of moviemaking is starting to form permanently in other states. A $146 million studio complex is being planned outside Detroit, and studios and post-production facilities are going up or already exist in Louisiana, Pennsylvania, Texas, Massachusetts, North Carolina and Florida. "There are now full studios available in the states that offered large incentives," said Paul Audley, president of FilmLA Inc., an organization that tracks Los Angeles-area location filming. "It's created an exodus of talent — not actors, but production people." Workers who have moved away say that while they miss the L.A. music scene, diverse restaurants and other conveniences of big city life, being farther afield has its perks, like being closer to nature and being able to afford a home. Sean Clouser, a native Californian with nearly 20 years of film industry experience, was surprised to find himself moving to Michigan last fall after working as a construction coordinator on the independent film "High School." Michigan offers up to a 42 percent tax credit. Clouser, 41, said he was attracted by the cheaper cost of living and by locals' friendliness and doesn't plan to return to the fast-paced life he left behind. There's also a lot of work from films being shot locally and in surrounding states. Makeup artist Tarra Day, 46, lived in Los Angeles for 20 years but thanks to work shifting out of California, she was able to move back to her home state of New Mexico in late 2005 to be with her aging father and grandmother. "It was a great opportunity to come be with my family and still be able to make a living," Day said. Jack Kyser, chief economist for the Los Angeles County Economic Development Corp., estimated that for every midsize film with an average $70 million budget that leaves California, the state loses nearly 700 indirect jobs and $10.6 million in sales and income tax. The trend continues this year. More than half of the 39 hourlong TV pilots for the upcoming season were shot outside California, according to Variety magazine. California is trying to stem the tide. A $500 million tax credit for movies and TV shows that shoot in California was signed in February by Gov. Arnold Schwarzenegger and will begin to accept applications July 1. Critics say the plan does little to stop the movement of production elsewhere. The credit, for up to 25 percent of production budgets spent in the state, is capped at $100 million a year — an amount that could be gobbled up by a few big budget movies. "My guesstimate is it'll be gone in the first month," said Hal Kessler, an entertainment attorney who specializes in tax breaks for independent films. That's just fine for those who have left. Keith Potter, a 39-year-old assistant director, moved to Santa Fe from Los Angeles in 2006 to book some out-of-city shooting days as required by the Directors Guild of America. He kept getting work in New Mexico though, and now he's preparing to shoot the second season of "Crash," a Starz pay TV series about race relations that's set in Los Angeles but shot in Albuquerque. Potter is smitten with New Mexico and says he'd only return to Los Angeles if it was best for his career. "I enjoy the place so much, my view now is that I'd rather just stay here."" ["format"]=> string(1) "1" ["revision"]=> int(0) ["name"]=> string(5) "admin" ["date"]=> string(25) "2009-06-04 14:41:06 +0200" ["status"]=> int(1) ["promote"]=> int(1) ["sticky"]=> int(0) ["moderate"]=> int(0) ["op"]=> string(4) "Save" ["submit"]=> string(4) "Save" ["preview"]=> string(7) "Preview" ["delete"]=> string(6) "Delete" ["form_build_id"]=> string(37) "form-fb667bf1112cdcc2c5cbc566286d6b7d" ["form_token"]=> string(32) "94d26befa6365a86645a60f977e3fdd0" ["form_id"]=> string(17) "article_node_form" ["comment"]=> string(1) "2" ["menu"]=> array(13) { ["mlid"]=> int(0) ["module"]=> string(4) "menu" ["hidden"]=> int(0) ["has_children"]=> int(0) ["customized"]=> int(0) ["options"]=> array(0) { } ["expanded"]=> int(0) ["parent_depth_limit"]=> int(8) ["link_title"]=> string(0) "" ["parent"]=> string(15) "primary-links:0" ["weight"]=> string(1) "0" ["plid"]=> string(1) "0" ["menu_name"]=> string(13) "primary-links" } ["path"]=> string(63) "united-states/hollywood-workers-settling-in-tax-friendly-states" ["pid"]=> string(4) "5313" ["pathauto_perform_alias"]=> int(1) ["old_alias"]=> string(63) "united-states/hollywood-workers-settling-in-tax-friendly-states" ["taxonomy"]=> array(3) { [3]=> string(3) "213" [6]=> string(3) "597" ["tags"]=> array(1) { [5]=> string(0) "" } } ["field_image"]=> array(1) { [0]=> array(15) { ["fid"]=> string(3) "269" ["list"]=> string(1) "1" ["data"]=> array(3) { ["description"]=> string(23) "this is the description" ["alt"]=> string(0) "" ["title"]=> string(0) "" } ["uid"]=> string(1) "1" ["filename"]=> string(17) "bruce_johnson.jpg" ["filepath"]=> string(46) "sites/default/files/articles/bruce_johnson.jpg" ["filemime"]=> string(10) "image/jpeg" ["filesize"]=> string(5) "36901" ["status"]=> string(1) "1" ["timestamp"]=> string(10) "1244119266" ["alt"]=> string(0) "" ["title"]=> string(0) "" ["filefield_upload"]=> string(6) "Upload" ["filefield_remove"]=> string(6) "Remove" ["upload"]=> string(0) "" } } ["search_block"]=> int(0) ["teaser"]=> string(140) "A 25-year veteran of the film industry, William Gilpin lived in Los Angeles his entire life until he moved to New Mexico at the end of 2007." ["validated"]=> bool(true) ["is_new"]=> bool(false) ["timestamp"]=> int(1244714340) } string(6) "update"

Please which inserts, variables and tables have to be looked out to find where this conflict is happening.

Look forward to any reply, and thank you :)
Lilian

#39

mariano.barcia - June 14, 2009 - 21:19

Dear maintainers,

I've been trying to setup this module, and I must say the steps required to make it properly run make it very difficult. I would not say "this module doesn't work" but hey, it's very difficult to actually make it work or to give it a try.

  1. go to each config screen and hit save: that is odd isn't it?
  2. not check "hide activivity": it seems perfectly reasonable to me, that everyone is able to "hide" any of his/her activity items
  3. admin activity is not recorded: why?
  4. not having an upgrade path to 2.x version
  5. not having a a way to properly uninstall the 2.x version

I think you should provide clear guidelines/warnings on the home page of the project, or at least in the README.TXT, about these pitfalls. Can they be considered critical? Well, if several users cannot configure it properly, then there is at least, an adoption problem. Priority could be called something like "Critical for adoption". :-) Ok so here below are my 2 cents.

  1. go to each config screen and hit save: this is covered in the documentation, I don't like it at all, but I can live with it as long as I am warned somewhere visible
  2. not check "hide activivity": rename the permission to something like "suspend activity"? Just a guess
  3. admin activity is not recorded: is this related to the above issue? If so, good for it, it's cleared
  4. not having an upgrade path to 2.x version: well, this is warned in the homepage, this one gets bigger in combination with the paired issue below.
  5. not having a a way to properly uninstall the 2.x version: there is no warning about this one

Now, I'm getting back to my drupal instance to try to make it work once and for all. As usual, thanks for the big effort of bringing this module alive, and kicking.

PS: I may have resources to contribute to 2.x version

#40

Scott Reynolds - June 14, 2009 - 22:56

not having a a way to properly uninstall the 2.x version: there is no warning about this one

It does. And even before, it uninstall everything but the actions and the variables. The actions don't affect Activity 1.x and the variables, if there is a name collision, can be configured by Activity 1.x as well. So this isn't causing the above mentioned issues, period.

#41

mikestefff - June 15, 2009 - 17:36

Here's a weird one...doesn't work for uid 1 (already known)...doesn't work for uid 2 (assuming the module doesn't work)...works fine for uid 3 (??)..

#42

Liliplanet - June 16, 2009 - 10:57

Hi,

Please I'm still struggling as no activity gets recorded in my database. Have logged in as not user 1, added node content and nothing ..

I ran the test and reported results at #38 of this thread, but no-one has found a solution perhaps?

Facebook Status activity gets recorded, but all contrib/modules do not.

Would most appreciate any help, as have now been struggling for weeks to make this work.

Look forward to any reply, and thank you.
Lilian

#43

mariano.barcia - June 16, 2009 - 18:21

@Scott,

I'm assembling a prototype with a bunch of modules, Activity being just one of them. So, I may have overlooked how the issue #5 is being handled/warned. Thanks for the clarification, I just mentioned that point because of others mentioning this circunstamce as a probable cause of their problems.

@Lilian
If Scott is correct, then the 6-2.x version uninstall should not have caused the problem. Actually, it didn't for me.

I think I did the same thing as you did (install 6-1.x, couldn't make it work, then install 6-2.x, then rolled back to 6-1.x). The 2nd time, after reading this thread, 6-1.x worked properly, all I did was un-check the "hide activity" permission. Past activity was not shown because it was not recorded (as per comments in #31) but all new activity (being done by regular users) started to show up at the main /activity/all page. Didn't have to mess with the DB values... I'm using Drupal 6.12 on PHP 5.2. HTH

#44

Scott Reynolds - June 16, 2009 - 18:52

admin activity is not recorded: why?

So why is actually really simple if you know how Drupal works. So in activity module, it does if (!user_access('hide activity')), which of course looks silly. The way Drupal's user_access function works is by the following "If current user is user 1, then ALWAYS grant access". Therefore, user 1's activity will ALWAYS be hidden.

I purpose we flip this. Create a permission 'create activity'. This means that in code it looks like if(user_access('create activity')), which is way cleaner. And it means user 1's activity is recorded.

#45

jaydub - June 16, 2009 - 19:01

#44 I agree that the current setup is less than optimal but the problem with using a positive permission such as 'create activity' is that then you can't easily suppress activity by other roles without another 'hide activity' role. That is of course assuming that most people will assign 'create activity' to the authenticated user role and perhaps won't have any additional roles.

If there are additional roles then they all inherit from authenticated user role permissions so if 'create activity' is set for authenticated users and there is no 'hide activity' then how do you suppress activity when desired? Basically when it came up we had requests for allowing suppression by role. The issue of uid 1 is another issue unfortunately and perhaps a setting just for admin would be doable so as to bypass the fact that permissions are always true for admin.

#46

Scott Reynolds - June 16, 2009 - 21:49

If there are additional roles then they all inherit from authenticated user role permissions so if 'create activity' is set for authenticated users and there is no 'hide activity' then how do you suppress activity when desired?

Pretty simple actually, create a role "Activity role" and assign it exactly one permission, "create activity". And as you noted, it inherits from the auth role, so any permissions that an auth user can do an 'activity role' user can do. Only assign 'activity role' to users who you want activity from. Seems like far more intuitive(edit:and more Drupal-y) that saying "make sure the auth role doesn't have hide activity permission and o btw user 1 can't create activity".

I get what your saying that on the surface it seems like current approach is easier. But in creeps silly bugs and other difficulties that get in the way. And i also think that as a developer your approaching the problem saying

how do you suppress activity when desired

shows the issue. The approach to the problem is backwards I think.

I would also caution against the assumption that "only having activity from certain roles" is a popular feature.

#47

mariano.barcia - June 17, 2009 - 00:08

Not sure I fully understand, but I can propose the following 2 simple actions

1. rename "hide activity" to "not log any activity"
2. change the test in the code from

if (!user_access('not log any activity'))

to

if (!user_access('not log any activity') || $user->uid == 1)

HTH, salud

#48

lelizondob - June 18, 2009 - 05:56

It took me a while and I had to read the whole conversation just to find out that the problem is explained in #25 with a beautiful screenshot... I think he's explanation and screenshot is relevant enough to promote it to the frontpage of this module. Let's save some minutes to the newbies please.

#49

mikestefff - June 22, 2009 - 17:30

No one finds it amazingly strange about what I posted in comment 41? Uid 1 & 2 don't work - but uid 3 works fine? I can't even think of a logical reason how the code would function like that...

Devel generate produces activity as well...

#50

mikestefff - June 22, 2009 - 20:32

OOooook now when I edit nodes under the main UID 1 account..activity registers... But it wouldn't before.. and it's not supposed to for uid 1. And the best part is that it lists the activity as done by 'Anonymous'...

Editing nodes and commenting under UID 2 still does nothing...

What in the world is going on here? This module actually works normally for some of you?

#51

mikestefff - June 24, 2009 - 00:11

More weird...just edited three different nodes as the UID 1...and activity logged the nodes as being changed each by a different user..

#52

As If - June 24, 2009 - 00:16

And I thought I had problems with my copy of this module! Yours seems to be haunted!

#53

jaydub - June 24, 2009 - 00:20

#51, the nodes that you edited, if they were created by different users, the activity logged is credited to the owner of the node.

See #320513: Editing a node authored by another user displays the activity as the original user did it.

#54

mikestefff - June 24, 2009 - 00:29

In what language does that make any sense?

#55

As If - June 24, 2009 - 01:37

He's saying it's about the UID of the author's name under Authoring Info; not necessarily your logged-in user name. So if "Admin" edited something that was originally written by "Steve" the activity should show up under "Steve".

#56

mikestefff - June 24, 2009 - 02:10

And I'm saying that it make no sense at all, is completely inaccurate and deceiving, and I cannot think of a single logical reason why it would be coded to do that..

#57

mikestefff - June 24, 2009 - 19:18

Does anyone at least have an idea where the bulk of the problems are? Is the activity or the contribs? It's too much code to start sifting through and debugging...I'm leading to believe it's activity itself because nothing works at all..

#58

mikestefff - June 24, 2009 - 19:32

Looks like the nodeapi function dies when checking the 'hide activity' permission...now i see why everyone is complaining about the name of that..it's a permission table - meaning that if checking that, you are given the permission to hide your activity..it SHOULDN'T mean that your activity is hidden...so are users still able to opt into privacy without the 'hide activity' permissions???

Edit: Yea I see you can still opt out. That permission title/function really needs to be changed...

#59

mikestefff - June 25, 2009 - 20:21

And I fixed the problem with the user who updates the node not being credited for it...

nodeactivity.module line 118 (replace the activity_insert() line with...)

if($op == 'update') {
  $user = '';
  global $user;
  activity_insert($user->uid, 'nodeactivity', $type, $op, $data, $target_users_roles);
}
else {
  activity_insert($node->uid, 'nodeactivity', $type, $op, $data, $target_users_roles);
}

Edit: Actually it should be if $op == 'update' || $op == 'delete' .... really it should just the global $user in all cases

#60

scottmotion - June 27, 2009 - 18:54

Haven't looked at the latest dev but it seems like the "hide activity" permission is just plain ambiguous. I enabled this thinking it would allow user to hide their activity if they wished. This should probably be renamed or moved out of permissions and into the activity settings menu. Activity seems to be working normalish...

#61

gooddesignusa - July 15, 2009 - 02:38

wow I assumed the same thing scottmotion. Thanks a lot

#62

N1ckhead - September 22, 2009 - 18:36

For most of us, I bet the problem is with checking the "hide activity" boxes in permissions.

#26, #32, #41 (and likely more) all reference this. I spent many hours trying to remedy this issue, when the whole time it was a damn checkbox.

I figured I was enabling the user to "hide activity" if he/she wanted to. No, I was turning off activity for everyone.

I dunno, I bet a lot of these issues are related to "hide activity" permissions.

#63

marcingy - January 5, 2010 - 23:58
Version:6.x-1.x-dev» 6.x-2.x-dev
Status:active» needs review

Initial patch to resolve the hide activity

This removes the check for hide activity in determining if an activity should be recorded and instead merges it with opt out.

<?php
/**
* Check if user has activity privacy optout set.
*/
function activity_user_privacy_optout($user) {
    if ((
variable_get('activity_user_optout', 0) || user_access('hide activity')) && $user->activity_optout) {
    return
TRUE;
  }
  return
FALSE;
}
?>

Users with the permission always have the option to opt out of having their activity logged.

AttachmentSize
activity_permissions.patch 5.72 KB

#64

Scott Reynolds - January 6, 2010 - 00:28
Version:6.x-2.x-dev» 6.x-1.x-dev
Status:needs review» needs work

nothing at all todo with 6--2 branch.

And you have commented out if blocks. If those blocks arn't needed then delete them.

#65

marcingy - January 6, 2010 - 02:22

My bad changing version - yes I realise that at the moment they are simply commented out. However I think the real issue is does the idea of merging the permissions check work if it does I'll reroll, but if it is a hey no it doesn't then there isn't much point and I'll just assume these tweaks fix my specific use case and not the general form.

#66

Scott Reynolds - January 6, 2010 - 17:27

I think the minor cleanup isn't bad, but it doesn't at all address the major issue. And that issue is 'hide activity' permission is really confusing. I suggested in #46 to reverse the logic, that is remove 'hide activity' and add a permission called 'record activity'. Then you are able to assign that to the role.

Or we could work on renaming 'hide activity' to a clearer name.

#67

marcingy - January 6, 2010 - 19:15

I'll work on rolling a cleaner patch today. I agree the name permission is confusing, it took me a while to work out why particular users were not getting activities recorded and then I found this thread.

 
 

Drupal is a registered trademark of Dries Buytaert.