I'm getting these errors:

Notice: Undefined offset: 53 in rate_generate_widget() (line 225 of /.../sites/all/modules/rate/rate.module).
Notice: Undefined offset: 52 in rate_generate_widget() (line 225 of /.../sites/all/modules/rate/rate.module).

Any ideas on how to get rid of these?

Here's the only patch I have applied to the rate module: rate-ds-1069906-39.patch

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Daglees’s picture

Do you happen to have Rate enabled on comments rather than nodes?

deanflory’s picture

I have the Fivestar rating on nodes and the thumbs up/down on comments, both based on votingapi and rate modules.

Daglees’s picture

Same here, it appears to me that some references in code are hardcoded to 'node', so that the permission checks fail (although the widgets will still work if anonymous users can vote).

deanflory’s picture

So, the only present workaround is to remove rate from comments? For my purposes it's more important to have thumbs up/down on the comments than it is to have a rating of the node itself.

deanflory’s picture

Title: Notice: Undefined offset: 53 in rate_generate_widget() (line 225 of /.../sites/all/modules/rate/rate.module). » No Rate on Comments? Notice: Undefined offset: 53 in rate_generate_widget() (line 225 of /.../sites/all/modules/rate/rate.module).
jaffaralia’s picture

I resolved this issues by applied this patch

jaffaralia’s picture

Status: Active » Needs review