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 get this notice at the question results page after finishing a quiz:
Notice: Undefined index: cid in comment_publish_action() (line 2542 of /home5/shuttew6/public_html/modules/comment/comment.module).
Also when i go to the "track" or "my results" page i get this notice:
Notice: Undefined variable: pre_score in theme_quiz_get_user_results() (line 326 of /home5/shuttew6/public_html/sites/all/modules/date-7.x-2.5/quiz-7.x-4.0-alpha9/quiz/quiz.pages.inc).
Comment | File | Size | Author |
---|---|---|---|
#4 | prescore-1709904-4.patch | 1.02 KB | ultimike |
Comments
Comment #1
RuneB CreditAttribution: RuneB commentedComment #2
gpsrattan CreditAttribution: gpsrattan commentedAfter Completing the quiz, i'm getting the following notice. What should be done to eliminate this?
Notice: Undefined index: cid in comment_publish_action() (line 2554 of /xxx/xxx/xxxxx/onlygoodies.com/modules/comment/comment.module).
Comment #3
ultimikeAttached is a patch against the 7.x-4.x branch that should take care of "Notice: Undefined variable: pre_score in theme_quiz_get_user_results".
Thanks,
-mike
Comment #4
ultimikeHere's an updated patch with an additional fix preventing undefined variable notices.
Thanks,
-mike
Comment #5
ultimikeComment #6
falcon CreditAttribution: falcon commentedGreat, thanks!