Skip to main content
Category:

Question:
How to resolve this error: CAPTCHA validation error: unknown CAPTCHA session ID. Contact the site administrator if this problem persists. 

Solution:

Edit the recaptcha.module file:

change this code:

// As the validate callback does not depend on sid or solution, this
// captcha type can be displayed on cached pages.
$captcha['cacheable'] = TRUE;

By this code:

// As the validate callback does not depend on sid or solution, this
// captcha type can be displayed on cached pages.
//$captcha['cacheable'] = TRUE;
$captcha['cacheable'] = FALSE;
\Drupal::service('page_cache_kill_switch')->trigger();

Riadh Rahmi

Senior Web Developer PHP/Drupal & Laravel

I am a senior web developer, I have experience in planning and developing large scale dynamic web solutions especially in Drupal & Laravel.

Web Posts

Search

Page Facebook