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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

marvil07’s picture

Status: Active » Fixed

Thanks for the report!

Here the patch I committed to 3.x and 2.x, I am asking for a not-null cid.

marvil07’s picture

actually, the patch I mentioned

thinkyhead’s picture

That looks like a good solution to me, thanks!

Status: Fixed » Closed (fixed)

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

soundboy89’s picture

So 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.