Step1: I created a Webform ( name is webform_test ) , it's only contained a Captcha element ( used Image Captcha )

Step2: I have used Page Manager to create a new page. ( New page -> Choose Variant type :Panels -> Assigned `Webform_test` into a region

Step3: Checked ( fill the correct text on image) , then i received a message error: The answer you entered for the CAPTCHA was not correct.

Step4: I check the log, have seen this message: post blocked by CAPTCHA module: challenge Image (by module image_captcha), user answered "EMBfj", but the solution was "c6f13953d88adfeefb3b52b292217a788c64da53a7033f9ca35a4145c4715345".

Have anyone the same bugs with me ?

I used:

Drupal 8.3.1
Panels: 8.4.x
Page Manager: 8.4.x
Webform: 8.x-5.0-beta12
Captcha: 8.x-1.0-beta1

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drupal.tips created an issue. See original summary.

drupal.tips’s picture

Title: Captcha + Panels + Page Manager : The answer you entered for the CAPTCHA was not correct. » Captcha + Panels + Page Manager + Webform : The answer you entered for the CAPTCHA was not correct.

- Changed the title for easy to know

id.aleks’s picture

FileSize
617 bytes

Actually it's a problem of a regular expression in captcha.module file. Seems that panels add their class to a form id with dash delimiter. For example webform_submission_interest_form_page_variant_interest_form-panels_variant-0_form. And the regular expression in line 345 of a captcha.module file trims dashes from a posted_form_id variable, and this causes regeneration of a captcha session, so users are not able to pass the captcha. So I excluded dashes from this regex.

id.aleks’s picture

Status: Active » Needs review
FileSize
615 bytes

Updated patch.

keshavv’s picture

I tested the #4 patch, Working fine .

greenjuls’s picture

Patch #4 works fine for me. Thank you.

Chris Matthews’s picture

Version: 8.x-1.0-beta1 » 8.x-1.x-dev
Status: Needs review » Reviewed & tested by the community

The 2 year old patch in #4 to captcha.module applied cleanly to the latest captcha 8.x-1.x-dev and works for me as well.

wundo’s picture

wundo’s picture

Status: Reviewed & tested by the community » Fixed

  • wundo committed 27c8d42 on 8.x-1.x authored by id.aleks
    Issue #2874151 by id.aleks, Chris Matthews: Captcha + Panels + Page...
wundo’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

lykyd’s picture

I have updated from 8.x-1.0-beta1 to 8.x-1.0-beta4
It made the bug happening again, even if the patch #4 seems to be in the 1.0-beta4 version.

So I had to downgrade back to 1.0-beta1 + patch #4 to solve the issue.

Macewans’s picture

Patch #4 has to be apply in 8.1.1 too!