Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I got these notices on frontpage after enabling thumsp-up-down:
Notice: Undefined index: up_percent in include() (line 11 of /***/sites/all/modules/contrib/rate/templates/thumbs-up-down/thumbs-up-down.tpl.php).
Notice: Undefined index: down_percent in include() (line 15 of /***/sites/all/modules/contrib/rate/templates/thumbs-up-down/thumbs-up-down.tpl.php).
Drupal 7.8
Comment | File | Size | Author |
---|---|---|---|
#6 | thumbs-up-down-tpl.patch | 801 bytes | Anonymous (not verified) |
Comments
Comment #1
dgastudio CreditAttribution: dgastudio commentedsame here
Comment #2
mauritsl CreditAttribution: mauritsl commentedI cannot reproduce this in the latest dev version.
Feel free to reopen ticket if you still get this message.
Comment #3
Aldus CreditAttribution: Aldus commentedI have the same problem (I just intsalled the module)
a print_r on $results gives this:
Array ( [count] => 1 [rating] => 1 [user_vote] => 1 [empty] => )
Comment #4
pradyumnahpt CreditAttribution: pradyumnahpt commentedSame Problem here to,I am getting these notices,with the latest development version too...Any solution please.
Comment #5
fruitsalad CreditAttribution: fruitsalad commentedHello got the same problem with thumb up/ thumb down. percentages are not displayed. just "You voted 'up'"
Notice: Undefined index: up_percent in include() (line 11 von -/sites/all/modules/rate/templates/thumbs-up-down/thumbs-up-down.tpl.php).
Notice: Undefined index: down_percent in include() (line 15 von -/sites/all/modules/rate/templates/thumbs-up-down/thumbs-up-down.tpl.php).
version used: rate-7.x-1.x-dev.zip
thank you all for help
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedIt's a simple check for variable existence. If you haven't rated a comment with thumbs up/down yet and have E_NOTICE error_logging, it'll show the warning. Patch is attached.
Comment #7
quotesBro CreditAttribution: quotesBro commented