Closed (fixed)
Project:
Heartbeat
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Apr 2012 at 18:04 UTC
Updated:
20 Oct 2012 at 08:53 UTC
Jump to comment: Most recent file
Comments
Comment #1
hedley commentedI've run into this issue as well, it seems to be being caused by the dynamic query in _heartbeat_comments_delete_access().
The fetchField() apparently only accepts numeric indicies which could be something to do with it (http://drupal.org/node/310075#executing_the_query) - removing the 'uid' seems to get it working. Or alternatively a static query can be used. Patches for both dynamic and static queries attached.
Comment #2
hedley commentedSomething else to note is that deleting comments with Javascript disabled currently throws an error
Comment #3
KorbenDallas commentedDo you recommend we use one patched method over the other? In other words, are there trade-offs?
Comment #4
hedley commentedGood question! I wasn't sure so went with both, but after reading this: http://drupal.org/node/835068 I think the dynamic query is the best one to use: 'heartbeat-commentdeletedynamic-1554974-2.patch'
Comment #5
KorbenDallas commentedTested OK for me. Reading this: fetchField, the dynamic query originally should had a 0 in it instead of 'uid'. By removing 'uid' as done the dynamic patch, fetchField is defaulting to the first field in the query, which is the same as putting a 0 in there.
I'm going to use the dynamic patch. Thanks hedley
Comment #6
Stalski commentedWhat you said in #1 is correct. The dynamic patch is committed.
Comment #8
suparnanr1 commentedI have followed the above instruction(I have applied the heartbeat-commentdeletedynamic-1554974-2.patch) but then also same error is coming when a non-admin deletes their own comment...
Please if possible, fix it...
Thanks in advance...