line 265 of share.module loads up the $node object with:
$content['share_'. $share->share_id .'_'. $node->nid]
Two problems here:
- a bug: $share->share_id is empty.
- a design flaw: adding the node ID to the node property means that a node template will need to muck about adding the ID when it prints the share. This is messy, and I don't see what purpose having the ID in the property name serves.
Comments
Comment #1
joachim commentedThe bug is down to the SQL query in the $share->load() function.
This line:
My share_share table has only this row:
0 Share 1
In other words, nothing that corresponds to the share id I am loading (which in my case is 5). So the left join results in a NULL share_id from the share_share table, and this clobbers the actual share_id from the share table.
I don't know what the share_share table is meant to represent, so I can't offer a proper fix for this.
An ugly workaround for anyone trying to get this to work is:
Comment #2
greenskin commentedThe issue with new share popups not storing their share_id has been fixed.
In the content of the $node object all share popups have been moved inside of ['share'] and are now keyed as ['share_'. $share->share_id] so resembles the following: