The recaptcha_mailhide module is no longer part of the 7.x version of the reCAPTCHA module, and it seems to have been removed without any cleanup of itself being added. This error gets shown on the site after updating to reCAPTCHA 7.x-2.1 now. Thanks in advance.

User warning: The following module is missing from the file system: recaptcha_mailhide. In order to fix this, put the module back in its original location. For more information, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1128 of /var/www/mysite.com/includes/bootstrap.inc).

Comments

vinmassaro created an issue. See original summary.

Ramdas Gaikar’s picture

Hello,

Please refer this link to resolve this issue

hass’s picture

Title: PHP warning due to reCAPTCHA Mailhide module removal » PHP warning due to module upgrade
Project: reCAPTCHA » Drupal core
Version: 7.x-2.x-dev » 7.50
Component: reCAPTCHA Mailhide » update.module

I'm moving this to core and shortly explain what happened here. I think this is a broken update module mechanismn, but I'm not sure.

1. You installed ReCaptach 1.x and enabled MailHide submodule.
2. Than you upgrade to ReCaptcha 2.x.
3. ReCaptcha 2.x has no MailHide submodule any longer.

The issue is - You will get the error BEFORE we can run update.php. This means I could fix the issue for your in an update hook, but the error will popup earlier. I do not think this is correct and core itself need to handle this.

What can always happen is that a module may remove a submodule. In such a case every one is stuck with this issue. Automatic update via webinterface will always run into this issue as is downloads a newer recommended module version and will replace the files before the upgrade hook has run. In this case the error always bubbles up.

I could nevertheless solve this somehow in an upgrade hook, but I'm not sure if this is my job. At least it was not in past and I cannot prevent the error from getting shown if you go through the update.php steps.

hass’s picture

Title: PHP warning due to module upgrade » PHP warning due to module upgrade that removed a submodule
vinmassaro’s picture

@hass: It seems like the module should clean up after itself if possible, even if this shows some warnings before update.php is run, no? Best practice is to always run update.php after a module update, so the warning would not be seen for long.

I never noticed that recaptcha_mailhide was removed from 7.x-2.x, so when we updated from 7.x-1.x long ago, it was never apparent until Drupal 7.50. I'd be happy to write a patch for reCAPTCHA 7.x-2.x that implements #3 here: https://www.drupal.org/node/2487215

hass’s picture

Title: PHP warning due to module upgrade that removed a submodule » PHP warning due to module upgrade that removed mailhide submodule
Project: Drupal core » reCAPTCHA
Version: 7.5 » 7.x-2.x-dev
Component: update.module » General

Ah, now I see. Ok, let's integrate this into update recaptcha_update_7200(). It will not help You, but others upgrading in future.

vinmassaro’s picture

What about putting it outside the upgrade hook so it catches both cases?

hass’s picture

? This requies an upgrade hook.

  • hass committed 587a8e8 on 7.x-2.x
    Issue #2770997 by hass: PHP warning due to module upgrade that removed...
hass’s picture

Status: Active » Fixed

Please give DEV a try and report back.

vinmassaro’s picture

7.x-2.x-dev works great, thanks for the fix.

Status: Fixed » Closed (fixed)

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

morybel’s picture

Thanks for Dev version, worked wonders to get rid of notice for recaptcha_mailhide missing.

User warning: The following module is missing from the file system: recaptcha_mailhide. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1138 of /home/mysite/public_html/includes/bootstrap.inc).