Hello. Interesting thing happening with the activity module. I was previously using the October 20th commit and went from that to the November 11th commit. I noticed that new certain new activities were not showing up in the view. Specifically, activities related to comment. My template is "Comment" and "Record an activity message when: comment insert type MYTYPE".

I thought this was strange and went to the database to check on what was there. The activity_messages table has what seems like correct activity messages reported so it looks like they are being written there successfully and they look exactly like all of the others. I then headed over to the activity_targets table and the entries now look different from the others. All of the old messages had a numeric entry in the 'aid' column except for the most recently generated ones - they now have 0 in the 'aid' column. The entries with 0 correspond to the 'amid' numbers of the items that are not showing up in the view. I have screenshots of this attached.

I reverted back to the October 20th version, commented on a node (with no other changes to anything), and now it works. I also attached screenshots of the activity_targets table which now seem to be back to working behavior. So I think something in the November 11 commit is perhaps problematic.

You see three screens - the two with the 1111commit tables, and one which was taken after that where I reverted to the 1020 code and added a comment.

Comments

Scott Reynolds’s picture

Status: Active » Needs review

right so this is because of a database change that doesn't have an associated update function

run this sql

ALTER TABLE activity ADD COLUMN eid int(11) DEFAULT NULL;

And you will be set.

rjbrown99’s picture

Awesome, thanks Scott I'll give it a try later today.

Scott Reynolds’s picture

Status: Needs review » Closed (fixed)

Closing

rjbrown99’s picture

Title: AID no longer written? » Upgrade older 2.x-dev to later revision

For what it's worth if anyone else happens to come across this ticket, I'm updating with a bit of help. I just now moved from the October 09 code to current (April 2010) and had to make a few more database schema adjustments.

1) I strongly recommend installing the schema module. http://drupal.org/project/schema. This will allow you to browse any schema mismatches from the module to your database at /admin/build/schema.

2) I had a number of changes that were required based on the schema module's discovered mismatches.

ALTER TABLE activity ADD COLUMN eid int(11) DEFAULT NULL;
ALTER TABLE activity CHANGE uid uid INT(11) UNSIGNED NOT NULL;
ALTER TABLE activity CHANGE nid nid INT(11) UNSIGNED NULL DEFAULT NULL;
ALTER TABLE activity CHANGE eid eid INT(11) UNSIGNED NULL DEFAULT NULL;
ALTER TABLE activity CHANGE created created INT( 11 ) UNSIGNED NOT NULL;
ALTER TABLE activity ADD INDEX (eid);
ALTER TABLE activity ADD INDEX (created);
ALTER TABLE activity_targets CHANGE language language VARCHAR(12) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

There may be others that are needed in the future so be sure to check out the schema.