I just updated the module "Webform" and I receive the following error :

[warning] The following module is missing from the file system: contribute bootstrap.inc:268

www.domaine.com@vps000000 ~/public_html $ composer update --with-dependencies
Gathering patches for root package.
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)                     
Package operations: 0 installs, 1 update, 0 removals
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
  - Updating drupal/webform dev-5.x (fed2e5d => bfac696):  Checking out bfac69619c
Writing lock file
Generating autoload files
Removing packages services cache file:
/home/www.domaine.com/public_html/vendor/drupal/console/extend.console.uninstall.services.yml
Creating packages services cache file: 
/home/www.domaine.com/public_html/vendor/drupal/console/extend.console.uninstall.services.yml
> DrupalProject\composer\ScriptHandler::createRequiredFiles
www.domaine.com@vps308496 ~/public_html $ drush updatedb
 [warning] The following module is missing from the file system: contribute bootstrap.inc:268
 [success] No database updates required

Comments

zenimagine created an issue. See original summary.

jrockowitz’s picture

zenimagine’s picture

Ok thank you, so nothing serious? no need to restore my site?

jrockowitz’s picture

Status: Active » Needs review
StatusFileSize
new1.94 KB

Since the Contribute module's dependency has been removed from the Webform module, the attached patch will manually uninstall the Contribute module. The update hook only executes the Contribute module is missing from the file system.

How to fix "The following module is missing from the file system..." warning messages

zenimagine’s picture

I do not understand what I have to do. I'm waiting for the next update or I apply the patch ?

jrockowitz’s picture

There is a minor bug that is breaking automated testing. I just committed a fix and all tests should start passing.

Please test the patch and confirm that the warning is no longer being displayed.

zenimagine’s picture

I applied the patch but it does not correct the problem

www.domaine.com@vps000000 ~/public_html $ drush updatedb
 [warning] The following module is missing from the file system: contribute bootstrap.inc:268
The following updates are pending:

webform module : 
  8114 -   Issue #2951921: The contribute module is missing from the file system. 


 Do you wish to run all pending updates? (yes/no) [yes]:
 > 

 [warning] The following module is missing from the file system: contribute bootstrap.inc:268
 [notice] Executing webform_update_8114
 [ok] Performing webform_update_8114
 [success] Cache rebuild complete.
 [success] Finished performing updates.
www.domaine.com@vps000000 ~/public_html $ drush updatedb
 [warning] The following module is missing from the file system: contribute bootstrap.inc:268
 [success] No database updates required
jrockowitz’s picture

I am a little stumped because I can't replicate the issue locally.

You also need to update your version of the webform module so that you get the very last commit which fixes the broken test but I don't think this will fix the problem.

floown’s picture

Hello,

I have apply the patch too, but the warning still exist.

zenimagine’s picture

The patch is applied and webform is up to date with the latest version dev, but still the same problem

jrockowitz’s picture

StatusFileSize
new2.65 KB

The previous patch is trying to detect if the contribute module is missing by looking for the contribute module's main directory.

The attached patch is specifically now looking for the contribute module's info.yml file.

Can you please look at your modules directory and see if there is a 'contribute' folder that is empty?

floown’s picture

I have no more contribute folder.

jrockowitz’s picture

StatusFileSize
new1.96 KB

The attached patch is the same approach as #11 but fixes a broken path.

zenimagine’s picture

The patch does not correct

Loading composer repositories with package information
Updating dependencies (including require-dev)                     
Package operations: 1 install, 0 updates, 0 removals
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
  - Installing drupal/webform (dev-5.x bd754fb): Cloning bd754fb25b from cache
  - Applying patches for drupal/webform
    https://www.drupal.org/files/issues/2018-03-12/2951921-13.patch ([warning] The following module is missing from the file system contribute bootstrap.inc 268)

Writing lock file
Generating autoload files
Removing packages services cache file:
/home/www.domaine.com/public_html/vendor/drupal/console/extend.console.uninstall.services.yml
Creating packages services cache file: 
/home/www.domaine.com/public_html/vendor/drupal/console/extend.console.uninstall.services.yml
> DrupalProject\composer\ScriptHandler::createRequiredFiles
www.domaine.com@vps308496 ~/public_html $ drush updatedb
 [warning] The following module is missing from the file system: contribute bootstrap.inc:268
 [success] No database updates required
jrockowitz’s picture

If drush updb does not execute webform_update_8114() the warning won't go away.

You can use the below command to manually execute webform_update_8114().

drush php-eval 'module_load_include('install', 'webform'); webform_update_8114()';

zenimagine’s picture

www.domaine.com@vps000000 ~/public_html $ drush php-eval 'module_load_include('install', 'webform'); webform_update_8114()';
www.domaine.com@vps000000 ~/public_html $ drush updatedb
 [warning] The following module is missing from the file system: contribute bootstrap.inc:268
 [success] No database updates required
zenimagine’s picture

What should be the path of the contribute folder ?

jrockowitz’s picture

Somewhere in /modules and most likely the same folder as the webform module.

zenimagine’s picture

I do not see any folder contribute

jrockowitz’s picture

Category: Support request » Bug report
Priority: Normal » Critical

I am marking this Critical because it is blocking #2951686: Release 8.x-5.0-rc4.

jrockowitz’s picture

@zenimagine I forgot that you must clear cache via drush cr after every update hook. I still don't think the update hook is working correctly. Can you try drush cr; drush status;?

The update hook is trying to determine if the Contribute module is still installed but the folder/code is missing and then it removes the module.

The below Drush command from https://www.drupal.org/node/2487215 should remove the warning and bypass the update hook

drush sql-query "DELETE FROM key_value WHERE collection='system.schema' AND name='contribute';"
drush cr;

Can you please see if it works?

If it does work, we still need to figure out what is wrong with the update hook.

zenimagine’s picture

I do not control drush, here are the results :

www.domaine.com@vps000000 ~/public_html $ drush cr; drush status;
 [success] Cache rebuild complete.
 Drupal version   : 8.5.0                                     
 Site URI         : http://default                            
 DB driver        : mysql                                     
 DB hostname      : localhost                                 
 DB port          : 3306                                      
 DB username      : www.domaine.com                           
 DB name          : www.domaine.com                           
 Database         : Connected                                 
 Drupal bootstrap : Successful                                
 Default theme    : bootstrap_subtheme_front_office           
 Admin theme      : seven                                     
 PHP binary       : /usr/bin/php7.1                           
 PHP config       : /etc/php/7.1/cli/php.ini                  
 PHP OS           : Linux                                     
 Drush script     : /usr/local/bin/drush                      
 Drush version    : 9.0.0-beta3                               
 Drush temp       : /tmp                                      
 Drush configs    :                                           
 Drush aliases    :                                           
 Install profile  : standard                                  
 Drupal root      : /home/www.domaine.com/public_html/web     
 Site path        : sites/default                             
 Files, Public    : sites/default/files                       
 Files, Private   : /home/www.domaine.com/public_html/private 
 Files, Temp      : /tmp                                      
www.domaine.com@vps000000 ~/public_html $ drush updatedb
 [warning] The following module is missing from the file system: contribute bootstrap.inc:268
 [success] No database updates required
www.domaine.com@vps000000 ~/public_html $ drush sql-query "DELETE FROM key_value WHERE collection='system.schema' AND name='contribute';"
 [error]  Query failed. 
jrockowitz’s picture

If you are using a database prefixes the drush command has include curly brackets..

drush sql-query "DELETE FROM {key_value} WHERE collection='system.schema' AND name='contribute';"
drush cr;
drush status;

BTW, drush status; should also be returning the warning.

zenimagine’s picture

Should I enter the prefix instead of {key_value} ?

www.domaine.com@vps000000 ~/public_html $ drush sql-query "DELETE FROM {key_value} WHERE collection='system.schema' AND name='contribute';"
 [error]  Query failed. 
jrockowitz’s picture

Yes please try the prefix key.

zenimagine’s picture

The prefix of my base is g652hkdr_

www.domaine.com@vps000000 ~/public_html $ drush sql-query "DELETE FROM {g652hkdr_} WHERE collection='system.schema' AND name='contribute';"
 [error]  Query failed. 
jrockowitz’s picture

This should work.

drush sql-query "DELETE FROM g652hkdr_key_value WHERE collection='system.schema' AND name='contribute';"
drush cr;
drush status;
zenimagine’s picture

It works, then I delete the patch 13 ?

www.domaine.com@vps000000 ~/public_html $ drush sql-query "DELETE FROM g657h4dr_key_value WHERE collection='system.schema' AND name='contribute';"

www.domaine.com@vps000000 ~/public_html $ drush cr;
 [success] Cache rebuild complete.
www.domaine.com@vps000000 ~/public_html $ drush status;
 Drupal version   : 8.5.0                                     
 Site URI         : http://default                            
 DB driver        : mysql                                     
 DB hostname      : localhost                                 
 DB port          : 3306                                      
 DB username      : www.domaine.com                           
 DB name          : www.domaine.com                           
 Database         : Connected                                 
 Drupal bootstrap : Successful                                
 Default theme    : bootstrap_subtheme_front_office           
 Admin theme      : seven                                     
 PHP binary       : /usr/bin/php7.1                           
 PHP config       : /etc/php/7.1/cli/php.ini                  
 PHP OS           : Linux                                     
 Drush script     : /usr/local/bin/drush                      
 Drush version    : 9.0.0-beta3                               
 Drush temp       : /tmp                                      
 Drush configs    :                                           
 Drush aliases    :                                           
 Install profile  : standard                                  
 Drupal root      : /home/www.domaine.com/public_html/web     
 Site path        : sites/default                             
 Files, Public    : sites/default/files                       
 Files, Private   : /home/www.domaine.com/public_html/private 
 Files, Temp      : /tmp                                      
www.domaine.com@vps000000 ~/public_html $ drush updatedb
 [success] No database updates required
jrockowitz’s picture

Now, we know the query works.

I need help figuring out what is wrong with the patch so that no one else has to manually fix this issue. Can you please revert your db and help me debug the patch.

zenimagine’s picture

Yes, no problem I will be available in 4h. Tell me what you want.

jrockowitz’s picture

StatusFileSize
new2.16 KB

The attached patch now outputs the below messages with the update hook. I also updated the database query to use Drupal database layer.

  • Contribute module is not installed.
  • Contribute module installed and exists.
  • Contribute module does not exist and is now uninstalled.

You can use the drush command to test it.

drush php-eval 'module_load_include('install', 'webform'); webform_update_8114()';

Our goal is to get 'Contribute module does not exist and is now uninstalled.' outputted and the warning should go away. I suspect that the database prefix is causing the issue.

zenimagine’s picture

Webform is up to date with dev version. I applied the last patch. I entered the orders. Here is the result :

www.domaine.com@vps000000 ~/public_html $ drush php-eval 'module_load_include('install', 'webform'); webform_update_8114()';
www.domaine.com@vps000000 ~/public_html $ drush updatedb
 [warning] The following module is missing from the file system: contribute bootstrap.inc:268
 [success] No database updates required
www.domaine.com@vps000000 ~/public_html $ drush cr
 [success] Cache rebuild complete.
www.domaine.com@vps000000 ~/public_html $ drush updatedb
 [warning] The following module is missing from the file system: contribute bootstrap.inc:268
 [success] No database updates required
jrockowitz’s picture

Darn! the eval needs a print statement to see the message outside of the updatedb command and I am also adding a drush cr.

drush php-eval 'module_load_include('install', 'webform'); print webform_update_8114()'; drush cr;

zenimagine’s picture

www.domaine.com@vps000000 ~/public_html $ drush php-eval 'module_load_include('install', 'webform'); print webform_update_8114()'; drush cr;
Contribute module is not installed. [success] Cache rebuild complete.
jrockowitz’s picture

StatusFileSize
new1.99 KB

Please try this patch which is only looking for the contribute.info.yml file.

zenimagine’s picture

www.domaine.com@vps000000 ~/public_html $ drush php-eval 'module_load_include('install', 'webform'); print webform_update_8114()'; drush cr;
 [warning] The following module is missing from the file system: contribute bootstrap.inc:268
Contribute module does not exist and is now uninstalled. [success] Cache rebuild complete.
jrockowitz’s picture

Did that fix the issue?

zenimagine’s picture

yes the warning message has disappeared :-)

jrockowitz’s picture

@zenimagine Thanks.

Maybe @floown can review the patch.

floown’s picture

For me, the contribute module is not installed and the directory doesn't exist.

Sorry,I don't know what patch I should apply now.

zenimagine’s picture

@float You must apply the fix #35 and the #33 command

floown’s picture

Fix #35 :

patch -p1 < 2951921-34.patch 
patching file includes/webform.install.update.inc
Hunk #1 FAILED at 2087.
1 out of 1 hunk FAILED -- saving rejects to file includes/webform.install.update.inc.rej
floown’s picture

█▓▒░admin@machine ░▒▓██▓▒░ Tue Mar 13 10:01:48am
$ drush php-eval 'module_load_include('install', 'webform'); print webform_update_8114()'; drush cr;
[warning] Use of undefined constant install - assumed 'install' (this will throw an Error in a future version of PHP) PhpCommands.php(28) : eval()'d code:1
[warning] Use of undefined constant webform - assumed 'webform' (this will throw an Error in a future version of PHP) PhpCommands.php(28) : eval()'d code:1
[success] Cache rebuild complete.
█▓▒░admin@machine ░▒▓██▓▒░ Tue Mar 13 10:01:48am
$ drush cr
[success] Cache rebuild complete.

Ok, it seems work even so!

  • jrockowitz committed 3f803d0 on 8.x-5.x
    Issue #2951921 by jrockowitz: [warning] The following module is missing...
jrockowitz’s picture

Status: Needs review » Postponed
jrockowitz’s picture

Status: Postponed » Fixed
zenimagine’s picture

I reestablished my database to test the new dev version and I have the same error.

Should you still enter the following command ?

drush php-eval 'module_load_include('install', 'webform'); print webform_update_8114()'; drush cr;

jrockowitz’s picture

Please don't use the drush command because it is bypassing the patch.

I just tagged a new release with the patch. Please test rc4.

If there any chance that you are reimporting the site's exported config and restoring the contribute.module which is now missing.

zenimagine’s picture

I updated to rc4 and rebuilt the cache, but still have the same warning.

floown’s picture

I have done a:
composer require "drupal/webform:5.0-rc4"

drush updb
 [warning] The following module is missing from the file system: contribute bootstrap.inc:268
 [warning] The following module is missing from the file system: contribute bootstrap.inc:268
 [success] No database updates required.

jrockowitz’s picture

Here are my steps to test webform_update_8114().

  • Install 8.x-5.0-rc3 (composer require "drupal/webform:5.0-rc3")
  • Confirm Contribute module installed (/admin/modules)
  • Confirm Community Information in Status Report (/admin/reports/status)
  • Download 8.x-5.0-rc4 (composer require "drupal/webform:5.0-rc4")
  • Delete contribute module's folder. If you are using composer contribute module should be removed from the build.
  • Confirm Community Information is not appearing in Status Report (/admin/reports/status)
  • Check that "User warning: The following module is missing from the file system: contribute" message is being logged. (/admin/reports/dblog)
  • Run database updates (drush updb -y)
  • Note you will see "The following module is missing from the file system: contribute" while database updates are running.
  • Run database updates (drush updb -y) and confirm no warnings will be displayed.

If webform_update_8114() is not executed during `drush updb` you will still see the errors. If you applied any of the above patches you need to revert your database to a state before testing the patches.

zenimagine’s picture

My backup was done on the dev version. How to get back to RC3?

jrockowitz’s picture

A 'dev' backup before you applied any patches from this ticket is fine.

zenimagine’s picture

Patch # 4 was applied and the database updated :-(

I deleted the patch to composer.

zenimagine’s picture

Currently there is no Contribute module.

If I update the dev to an RC3, if I install "Contribute" and uninstall it.

Can it be corrected ?

jrockowitz’s picture

Drupal increments your module scheme (via update hooks) and it is pain to deincrement them.

You should just execute the below drush command to get rid of the message once the contribute module is deleted.

drush php-eval 'module_load_include('install', 'webform'); print webform_update_8114()'; drush cr;

zenimagine’s picture

I entered the command on RC4 is it seems to work. Here is the result :

www.domaine.com@vps000000 ~/public_html $ drush php-eval 'module_load_include('install', 'webform'); print webform_update_8114()'; drush cr;
 [warning] The following module is missing from the file system: contribute bootstrap.inc:268
 [success] Cache rebuild complete.
www.domaine.com@vps000000 ~/public_html $ drush updatedb
 [success] No database updates required
zenimagine’s picture

No "Contribute" folder on my FTP and no "Contribute" module in drupal modules.

The problem is solved ?

jrockowitz’s picture

I think the problem is solved.

zenimagine’s picture

The "Comtribute" module is now part of "Webform" is that it ?

jrockowitz’s picture

The Contribute module's dependency has been removed from the Webform module. The Contribute's module message is being moved into the Webform module and replaces the 'About' section.

heddn’s picture

Status: Fixed » Needs work

I don't know if this should be re-opened or a new issue opened. But there fix from #44 doesn't resolve my problem. Because I'm failing on the earlier 8106 update hook.

function webform_update_8106() {
  if (!\Drupal::moduleHandler()->moduleExists('contribute')) {
    \Drupal::service('module_installer')->install(['contribute']);
  }
}

And in my case, the module wasn't in the composer.json and it doesn't exist on the disk. So my deployment fails.

jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new724 bytes

@heddn Please try the attached patch.

heddn’s picture

Status: Needs review » Reviewed & tested by the community
heddn’s picture

Although, I've also seen leaving the hook and adding an inline comment as its contents stating this was removed intentionally. But #63 fixes the problem. So I'm not going to block on nit.

jrockowitz’s picture

@heddn I think I want any reference to the contribute.module dependency removed from the Webform module's history. :)

I will commit the patch and tag another RC in few days. I would really like to resolve #2952718: Error when adding email handler: "Body default value (@format) is using the following invalid tokens:" ... before tagging another release.

  • jrockowitz committed 0624f5a on 8.x-5.x
    Issue #2951921 by jrockowitz, zenimagine, floown, heddn: [warning] The...
jrockowitz’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

steven jones’s picture

Sorry to pop another comment on here, but we're updating webform on some sites, and we're seeing the warning:

[warning] The following module is missing from the file system: contribute bootstrap.inc:268

Coming from webform_update_8114, because it's doing drupal_get_path for a module that doesn't exist.

I appreciate that in this issue it seems like that's expected, and we should ignore it, but the trouble for our use-case is that we're updating thousands of sites, and we need to know when there are warnings and errors logged during database updates so we can go back and check, but this update adds a ton of noise to our systems, making it really hard to spot genuine issues.

I know for certain that the contribute module is gone from our codebase, but is there a reason that this check isn't an 'is contribute module installed' check?

steven jones’s picture

StatusFileSize
new542 bytes

Here's a patch that simply suppresses the error. If anything else fails in that function, well, your Drupal will break in other ways, so isn't probably too bad a thing to do.

zenimagine’s picture

Issue summary: View changes