I have seen a couple of instances of duplicate activity log messages on fairly OOB Commons installations. See the attached screenshots. At this time I am not sure whether this is due to a misconfiguration in Commons or whether it is a bug in the Acticity Log module.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cpliakas’s picture

Status: Active » Postponed (maintainer needs more info)

Search fail. Might be a duplicate of #1256642: Duplicate status updates. Marking as postponed, because I am sure you need more info.

lightsurge’s picture

I'm seeing the same thing occasionally, regenerating the logs seems to clear it up (sometimes), but I can't figure out why it happens.

david.moore.ipg’s picture

Is it related to cross posting in multiple groups?

That said, it is annoying to get three messages about the same post that was assigned to three groups. Could the notification system not figure that out and send one notification? Or has that been fixes and I just don't have mine fixed?

cpliakas’s picture

Status: Postponed (maintainer needs more info) » Active

Marking as active since multiple people are seeing this issue.

lightsurge’s picture

I'm guessing the patch at #1250820: The activity_log views should have a uniqueness filter probably will fix it though. Expect it'll be fixed in Commons as part of #1256076: Activity Stream modules are out of sync with Drupal.org

ezra-g’s picture

I believe lightsurge is correct in #5.

mstef’s picture

Still getting dupes with the latest activity stream and commons.

cpliakas’s picture

I'm still getting them as of Commons 2.3 even after regenerating the streams. Haven't tested the bleeding edge code.

mstef’s picture

FileSize
49.55 KB

Continuing the conversation started on #1272620: Remove unnecessary distinct from views, add caching to Views blocks about the dupes, here's something the scares me (see attached). 7 messages added for one node created.

mstef’s picture

FileSize
66.97 KB

Query showing the two duplicate messages in the attached image:


mysql> select m.mid, m.tid, m.stream_owner_type, m.target_id, m.target_type, m.acting_uid, t.display_type, t.rule, t.action_label from activity_log_messages m left join activity_log_templates t on t.tid = m.tid where m.mid IN (7, 9);
+-----+-----+-------------------+-----------+-------------+------------+--------------+-----------------------------------+----------------------------------------------+
| mid | tid | stream_owner_type | target_id | target_type | acting_uid | display_type | rule                              | action_label                                 |
+-----+-----+-------------------+-----------+-------------+------------+--------------+-----------------------------------+----------------------------------------------+
|   7 |   4 | user              |         2 | node        |          1 | web          | rules_activity_log_node_insert_og | Log activity for the acting user             |
|   9 |   6 | user              |         2 | node        |          1 | web          | rules_activity_log_node_insert_og | Log activity for members of the active group |
+-----+-----+-------------------+-----------+-------------+------------+--------------+-----------------------------------+----------------------------------------------+
2 rows in set (0.00 sec)

Focusing on the action_label.

ezra-g’s picture

Note, cpliakas is using Commons 2.3, whereas mikesteff is using the 2.x dev version of Commons, which includes current versions of Activity log and related modules.

@mikesteff, if you haven't, might be worth doing a git pull on Activity log to make sure you're still up to date.

mstef’s picture

I'm up-to-date on activity_log.

ezra-g’s picture

Title: Duplicate entries in activity streams » Activity messages about a user are duplicated about that user
Component: Code » Documentation

It seems that the messages are duplicated only for the acting user. For example - in the example below, cbrookins sees dupes of his own node creation message but egildesgame does not and vice versa.

As far as I can tell, there is no duplication of status messages.


ezra-g’s picture

Component: Documentation » Activity/status streams
ezra-g’s picture

Title: Activity messages about a user are duplicated about that user » Duplication of messages about node creation in group for acting user
Project: Drupal Commons » Activity Log
Version: » 6.x-1.x-dev
Component: Activity/status streams » Code
FileSize
87.51 KB

I was able to verify this behavior on a fresh installation of Activity log with Drupal 6.22, based on http://drupal.org/sandbox/ezrag/1329794.

Here's a screenshot from my fresh install.Activity stream

ezra-g’s picture

Assigned: Unassigned » ezra-g

I was able to resolve the duplicates by removing "Log activity for the acting user" from this rule, since the acting user is a member of the group and therefore already sees this action logged.

I'm working on a patch to update the default rules. Hooray, enormous arrays :).

ezra-g’s picture

Status: Active » Needs review
FileSize
90.31 KB
ezra-g’s picture

The previous patch accidentally removed a function definition.

IceCreamYou’s picture

Thanks for the patch -- just wanted to note that it's on my to-do list and after this is fixed I'll tag a new release (although I'd like to get in #1340600: UR Integration: Problem with non-approved statuses of non one way relationships showing up too if anyone has some bandwidth to test it).

IceCreamYou’s picture

I guess this is still the only blocker for tagging a new release. The main reason I haven't gotten to this patch is because it's a much bigger patch than necessary and I can't tell what was added and removed. If all you did was remove the "Log activity for the acting user" action from the "Log activity when a node is created in a group" rule, wouldn't the first attached patch be enough? And if the problem is just that the acting user sees two activity messages, shouldn't the second attached patch be more appropriate?

ajayg’s picture

Status: Needs review » Needs work

I tried only patch 2 as it was simple. I verified the original all four rules are no longer getting created as default.
Now only two rules appear
Log activity for members of the active group
Log activity for related taxonomy terms

so far so good. But when I created one activity, 2 messages for same activity still appeared. Earlier there used to be 3 messages per activity (one slightly different for group). This for the active user.

Now this was happening because there are indeed 2 rules. I created one activity (created a node in a group) and assigned into 3 more taxonomy terms. And it created 4 activity messages. One for node creations and 3 for each taxonomy terms. Is that expected? But then it is irritating even expected.

what is the reason "Log activity for related taxonomy terms" rule is required for group activity? What is the use case when this will be used? If not a common use case, we should remove from default rules.

IceCreamYou’s picture

Actually, this really should have nothing to do with what rules are defined. Activity Log includes a mechanism that ensures that only one activity message gets recorded for each event regardless of how many rules get triggered for that event. Apparently that is failing here. The patches in #20 were just to try to figure out what #18 is trying to accomplish.

Vilcoyote’s picture

Hello any news about this problem? I'm having it with version 2.4 of commons and it duplicates up x12 in one case (and more than 5 regularly).
I also checked this out from the point of view of a basic authenticated user and he also sees 12x duplicates of, for example, wiki page creation posted by someone else. So it isn't just a double line seen only by the creator of the content.

edit:
problem was solved. It was the same kind of problem. The message would be repeated for every tag added to a page (wikis, etc). Just remote the taxonomy rule and everything was fine.