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

multiple errors when no radio button selected

Comments

michaellenahan created an issue. See original summary.

michaellenahan’s picture

StatusFileSize
new454 bytes

Here's the patch.

michaellenahan’s picture

Status: Active » Needs review
sgdev’s picture

The 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 jQuery siblings option is not going to work in standard implementations without other adjustments.

The right way to handle this is a basic clearing of .messages class items in beforeSubmit. However, it is *required* to also implement the pollWrapper patch for it to work accurately (which needs to be committed anyway): https://www.drupal.org/project/ajax_poll/issues/1240768

See 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

sgdev’s picture

Status: Needs review » Closed (duplicate)
Related issues: +#1417230: Found bug in ajax_poll.js (messages are not overrided and display many messages)

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