We noticed this error, when we click "vote" more than once without selecting an option.

| Comment | File | Size | Author |
|---|---|---|---|
| #4 | ajax_poll-multiple_error_messages-2666930-4.patch | 722 bytes | sgdev |
| #2 | multiple_error_messages-2666930-2.patch | 454 bytes | michaellenahan |
| multiple-errors-when-nothing-selected.png | 31.43 KB | michaellenahan |
Comments
Comment #2
michaellenahan commentedHere's the patch.
Comment #3
michaellenahan commentedComment #4
sgdev commentedThe approach in patch #2 will not work for all sites. It seems like you have something customized in your CSS to generate a class of
.messages--error. There is nothing like that in standard Drupal. Also the jQuerysiblingsoption is not going to work in standard implementations without other adjustments.The right way to handle this is a basic clearing of
.messagesclass items inbeforeSubmit. However, it is *required* to also implement thepollWrapperpatch for it to work accurately (which needs to be committed anyway): https://www.drupal.org/project/ajax_poll/issues/1240768See the attached patch for an update, and reference this patch to make it work correctly:
https://www.drupal.org/project/ajax_poll/issues/1240768#comment-6193570
Comment #5
sgdev commentedAfter reviewing this issue (https://www.drupal.org/project/ajax_poll/issues/1417230), I thought it was best to just close this task.
The item in question is handled by the patch in #7, which is needed anyway.