Hi Stalski,

I few days ago I updated to the current dev from December 1st and now I have a problem with the message objects. They all have a nid of 0 which of course is not correct. At least this is the case when printing the $object variable in a custom DS field. I just reviewed the code of HDS and I think that this should happen without DS as well but I didn't have the time to look further into this. Maybe tonight after work. Maybe you're faster...

CommentFileSizeAuthor
#8 heartbeat.patch935 bytesDrakeRemory

Comments

DrakeRemory’s picture

I forgot to mention that this was not the case with 6.x-4.10 and the DB entries are fine.

DrakeRemory’s picture

Category: bug » task
Priority: Normal » Minor

Hi Stalski,

if found the problem! The nid was reset to 0 in heartbeat_comments_heartbeat_load and therefore not available in $object variable in my custom DS field. My current solution is just using hook_heartbeat_load in a custom module as well but before heartbeat_comments does and saving the nid to nid_bu as a backup. I think this is something hds should do.

Stalski’s picture

Status: Active » Needs review

Hmm yeah, that was a fix for some other bug. I will have to refactor this. The other bug was that comment box showed up when node comments and commenting was enabled but configured in the node type. For this case, the caching id was set wrong it showed the comment form.

This should be fixed now as well as your bug.
Can you check in dev to see if it works for you too?

DrakeRemory’s picture

I will do that tonight!

DrakeRemory’s picture

Status: Needs review » Fixed

Hi Stalski,

it works. Thanks!

DrakeRemory’s picture

Also it would be nice to have all NIDs in that object variable when messages are grouped...

Stalski’s picture

that is somethign you can do yourself. Just add the !nid variable in the rules ui (or via code heartbeat_api_log)

DrakeRemory’s picture

StatusFileSize
new935 bytes

Sure I have that one added but in grouped messages I only have the nid of the first message in the $object variable of a custom display suite field. It would be nice to have an array with all nids of the messages that are grouped together. Then I can add images of all nodes below the message. The attached patch provides this feature.

Stalski’s picture

ah like that. I always put the image in the message as well. I group on user to summarize images then.
I will look at your patch as well, could be nice if it does not create extra load.
At this point, new features will only be accepted as the performance is acceptable.

Status: Fixed » Closed (fixed)

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