Hi,

I am running heartbeat with profile2 module and when I make updates to a user's profile, I get the following error:

Notice: Trying to get property of non-object in HeartbeatActivity->set_actor() (line 177 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\heartbeat\includes\heartbeatactivity.inc).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null: INSERT INTO {heartbeat_activity} (message_id, nid, uid, nid_target, uid_target, cid, access, timestamp, language, variables, in_group) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10); Array ( [:db_insert_placeholder_0] => heartbeat user updates an existing profile [:db_insert_placeholder_1] => 0 [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => 0 [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 0 [:db_insert_placeholder_6] => 2 [:db_insert_placeholder_7] => 1334865729 [:db_insert_placeholder_8] => en [:db_insert_placeholder_9] => !username=|=/users/joe#profile-main-|- [:db_insert_placeholder_10] => 0 ) in HeartbeatActivity->log_message() (line 528 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\heartbeat\includes\heartbeatactivity.inc).

This error does not occur the first time you make updates to a user's profile, but does occur each and every time you make any subsequent changes to a user's profile.

A message also appears that the changes were made to the users' profile but after looking, no changes are ever made.

Any insight would be greatly appreciated.

Thanks

Comments

Stalski’s picture

Status: Active » Postponed (maintainer needs more info)

I think a rule is active "Log activity when a user updated his/her account".
Here is the export on how the "uid" needs to be configured.

{ "rules_log_activity_user_account_update" : {
    "LABEL" : "Log activity when user account is updated",
    "PLUGIN" : "reaction rule",
    "TAGS" : [ "heartbeat" ],
    "REQUIRES" : [ "rules", "heartbeat_rules" ],
    "ON" : [ "user_update" ],
    "DO" : [
      { "heartbeat_activity_heartbeat_edit_account" : {
          "nid" : "0",
          "uid" : "[account:uid]",
          "nid_target" : "0",
          "uid_target" : "0",
          "message_id" : { "value" : { "heartbeat_edit_account" : "heartbeat_edit_account" } },
          "!username" : "[account:link]"
        }
      }
    ]
  }
}

So in your case, the [account:uid] is not there OR does not work like that.
Can you elaborate on this?

oystercrackher’s picture

Stalski,

The rule you have listed is disabled, but I did have another rule that I created from scratch using the pid instead of uid; changing to uid fixed the issue.

Thanks for your help.

Stalski’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

ok then :)

Stalski’s picture

Issue summary: View changes

added message stating changes are never made to profile eventhough they appear to have been committed successfully