8.3.0 Captcha fails until image manually reloaded0 1 Browser Info Environment
1. Place 2 or more form blocks on a page
2. enter captcha code - fails
3. click on captcha image to reload - passes
4. enter captcha code - fails
and so on
I made a form block package where I added a unique block ID to the captcha image in view:
$captcha->setPictureAttributes([ 'id' => 'captcha_img'.$bUID, ]);
and then reload the image in jQuery itself:
$('#captcha_img'+bUID).attr('src', $('#captcha_img'+bUID).attr('src').replace(/([?&]nocache=)(\d+)/, '$1' + ((new Date()).getTime())));
and now all forms pass the captcha test, multiple forms on the same page. If I switch back to the core's default captcha library, the tests fail randomly again.
See the attached screen capture (sorry for that not being in English, but it's clear that the failure is shown in red, when it passes it's green).
As you can see, captcha fails until the image is manually reloaded with a click. Sometimes, sometimes (!) it starts passing from the very beginning, but then randomly fails and the same stuff happens.