I am not sure if this is a bug or not.
In heartbeat.module
in function _heartbeat_messages_rebuild($defaults, $stored)
this comparison runs
$diffs = array_diff_assoc($default, $stored_lookup[$default['message_id']]);
after
$default['concat_args'] = heartbeat_encode_message_variables($default['concat_args']);
but when 'concat_args' is stored, it is prepared with
function _heartbeat_message_prepare($record)
which adds these two values, if missing,
$record->concat_args['merge_separator_t'] = preg_match('/[a-z]/', $record->concat_args['merge_separator']);
$record->concat_args['merge_end_separator_t'] = preg_match('/[a-z]/', $record->concat_args['merge_end_separator']);
so the comparison above appears to always fail for messages heartbeat_add_node and any other that does not explicitly set 'merge_separator_t' and 'merge_end_separator_t'.
Comments
Comment #1
Stalski CreditAttribution: Stalski commentedThat was a patch from someone, but your reasoning is correct again.
This is tackled by cleaning that variables before checking. I made some internal TODO's that allows me to recheck the whole concept of the diff. It seems some other things are not working anymore as well, for instance the variables are not there anymore due to some other fix.
Why didn't I simpletest all of this.