When i'm trying to post comment as anonymous user (not logged in) it posts, but above the comment pops up error table with this text:
"user warning: Duplicate entry '57-0' for key 'PRIMARY' query: INSERT INTO activity_targets (aid, uid, amid) VALUES (57, 0, 114) in www.mysite.com\includes\common.inc on line 3422."

I've got Activity module v 2.x dev installed.

Comments

Kane’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev

Oh, forgot most important part. This error popsup when ajax comment is enabled. So i think i need to repost this issue in ajax comments module.

Scott Reynolds’s picture

Title: Error when anonymous user posting comment » make anonymous user activity work
Category: bug » feature

ya Anon posting in general is going to cause issues. This is because the public message has uid = 0; Perhaps we need to examine anon activity and use -1 as the public message?

Any activity with an anon user will not work

Scott Reynolds’s picture

Status: Active » Fixed

Ok so I added this stuff in. It won't always behave nicely though. For instance, comments you need to enforce users to leave a name in order for the comment name token to work.

http://drupal.org/cvs?commit=225294

Kane’s picture

Thanks a lot!

Scott Reynolds’s picture

Btw, check you path.
arg(1) should take node id from url, but only if your path's correct (http://api.drupal.org/api/function/arg/6).

?? Thats not part of that commit.

Kane’s picture

That's why you should check all post which you make via cell phone :))

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

drewish’s picture

Version: 6.x-2.x-dev » 6.x-1.x-dev
Category: feature » bug
Status: Closed (fixed) » Patch (to be ported)

marked #522098: Every time anonymous user posts a comment there is error message. Is it safe to use? as a duplicate of this. re-opening for the 1.x branch since it looks like it's still a problem there.

sirkitree’s picture

Status: Patch (to be ported) » Closed (won't fix)

closing. 1.x no longer supported.