Decided to push a site's activity from 1.x-dev to 2.x-dev and the following errors are occuring while login in to site.

user warning: Duplicate entry '1-0' for key 1 query: INSERT INTO activity_messages (amid, uid, message) VALUES (1, 0, '[name] has logged in') in /includes/common.inc on line 3431.

I checked the table and only 1 row is inserted. This is on drupal-6.11 with -dev modules. I tried to completely remove activity.module to rule out any issues with 1.x-dev update but still get errors.

thanks in advanced.

Comments

likewhoa’s picture

just ran latest activity update and this pops up on login.

user warning: Table 'tooli_db.activity_targets' doesn't exist query: INSERT INTO activity_targets (aid, uid, amid) VALUES (5, 0, 5) in /includes/common.inc on line 3431.

Any glues why those tables are not there?

sirkitree’s picture

Status: Active » Closed (duplicate)

DO NOT try to migrate 1.x to 2.x without an upgrade path - we haven't written one yet.

Please see this issue: #449988: error message "Unknown column 'nid' in 'field list' query: INSERT INTO activity_messages "

likewhoa’s picture

Status: Closed (duplicate) » Active

I am not encountering issues related to #449998: XML sitemap 6.x-2.x-dev progress. I did try initially to upgrade and when saw that tables were missing I actually downloaded old 1.x version and removed the tables myself after running uninstall on 2.x. The issue now still stands and doesn't seem to related to that bug's issues. Currently tables match for 2.x while comparing them in activity.install but each activity trigger event gives a "user warning: Duplicate entry ..." error message.

After looking at the table in question "activity_targets" I noticed that all the uid are set to "0" but this was tested with two users, so should there be 0 plus whatever the other uid might be? The latest error is "user warning: Duplicate entry '6-0' for key 1 query: INSERT INTO activity_targets (aid, uid, amid) VALUES (6, 0, 12) in /includes/common.inc on line 3431." upon login in to site. Thanks in advanced.

Scott Reynolds’s picture

Title: user warning: Duplicate entry '1-0' .... » User Login Trigger doesn't appear to work correctly

Changing title to reflect your issue

P.S. ironic that you linked to the wrong issue yet! found for me a very important thread! woot! thanks

likewhoa’s picture

yea first it was the login trigger then I hit the 1.x -> 2.x upgrade issue with missing tables after but I managed to get pass that. Is this a bug that you can reproduce? I will try on another install myself.

Scott Reynolds’s picture

detail out which trigger you are using please. I know where in code to make a fix but I need steps to reproduce.

More information the better.

Scott Reynolds’s picture

Title: User Login Trigger doesn't appear to work correctly » hook_activity_info not providing an object with a uid.
likewhoa’s picture

Using 'User" activity type with "login or logout" trigger.

Scott Reynolds’s picture

Status: Active » Fixed

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

You will have to redo your tokens. But its fixed. logging on and off is handled now.

likewhoa’s picture

thanks will try to update later as I don't see it yet.

Status: Fixed » Closed (fixed)

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