Apparently when the comment's cid is zero (as in the case of previewing a comment) the widget renders anyway. This causes the vud_widget_proxy function to receive a null value for $content_id. Later code is confused by this condition, resulting in a huge mysql query (likely) and an out of memory error when the module tries to load the array.
The simplest fix is to add the following line to vud_widget_proxy in vud.theme.inc:
$content_id *= 1;
However, this results in a widget that can be used to vote on Comment #0, which is nonsense. It would be better to show a disabled version of the widget, or not to show the widget at all.
Comment | File | Size | Author |
---|---|---|---|
#2 | 0001-bug-1039888-by-marvil07-slurslee-Fixed-Comment-previ.patch | 1003 bytes | marvil07 |
Comments
Comment #1
marvil07 CreditAttribution: marvil07 commentedThanks for the report!
Here the patch I committed to 3.x and 2.x, I am asking for a not-null cid.
Comment #2
marvil07 CreditAttribution: marvil07 commentedactually, the patch I mentioned
Comment #3
thinkyhead CreditAttribution: thinkyhead commentedThat looks like a good solution to me, thanks!
Comment #5
soundboy89 CreditAttribution: soundboy89 commentedSo I have VUD 6.x-3.1, and I'm still getting this error. This fix is already included in the code for that version right? I went in and found that the check for a not-null cid is in there already, but the problem persists. I confirmed that it's being caused by the vud_comment module, since disabling it makes the problem go away.
Edit: tried the fix proposed by the original poster and the memory error persists.