Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Getting the following error after upgrading to the 7.x-2.1:
PHP Fatal error: require_once(): Failed opening required 'sites/all/modules/recaptcha/src/ReCaptcha/RequestMethod/Drupal7.php' (include_path='.:') in sites/all/modules/recaptcha/recaptcha.module on line 15
Did a quick search in the module directory for "Drupal7.php" and found it in recaptcha.info file line 17. Looks like an incorrect file name issue. I changed it from:
files[] = src/ReCaptcha/RequestMethod/Drupal7.php
files[] = src/ReCaptcha/RequestMethod/Drupal7Post.php
Since the filename in src/ReCaptcha/RequestMethod/ was Drupal7Post.php. However, I am still getting the above error. Any ideas?
Comments
Comment #2
hass CreditAttribution: hass commentedDo not use drush
Comment #3
pdesai CreditAttribution: pdesai commentedSeems to work if I grab it from drupal.org - any ideas why drush didn't work?
Comment #4
ExTexan CreditAttribution: ExTexan commented@hass, I see you replied very quickly after the issue was created - good job on that. However, when you mark an issue as "Closed (duplicate)", it would be nice if you could link to the duplicate issue. I don't know why, but my search of "Drupal7Post" didn't find that other issue. [I finally found it by searching "Drush" in the recaptcha issue queue.]
In any case, since that one seems to be specifically about Drush, I thought I should report back to *this* issue because I got the same error, but I did not use Drush. So where @pdesai says, "Seems to work if I grab it from drupal.org" didn't apply in my case. I *did* grab it from there, and got the error as stated in the original post when I tried to access my site.
My site was offline, so I didn't have much time to dig into this - I just reverted back to v2.0 and it is working now.
Comment #5
hass CreditAttribution: hass commentedI cannot always search for the issues. On mobile it is no fun.