Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fresh install of drupal 9.3.x site and various modules (webform, profile, private message, etc.) fail to update DB - all DB schema updates are shown as needed - " Schema information for module xx was missing from the database" error shown #1642

Closed
EdNett opened this issue Feb 24, 2022 · 6 comments

Comments

@EdNett
Copy link

EdNett commented Feb 24, 2022

Hello,
(march 24 update):
On a fresh intall of drupal 9.3.x site, various modules (webform, profile, private message, etc.) fail to update DB - all DB schema updates are shown as needed - " Schema information for module xx was missing from the database" error shown

It appears that the below error is just one of a whole class of similar errors happening with module schemas are missing according to drush. Have I been hacked, I wonder, if no-one else is experiencing these problems. It's happening on more than one server on more than one site !

On a fresh intall of drupal 9.3 and Webform 6.1.3 - webform fails to update DB . The below modules are not recognized by AEgir and the site doesn't "see" them. Is this because of the directory called "tests" or because of the path length or depth?

/static/d9/web/modules/contrib/webform/modules/webform_options_custom/tests/modules/webform_options_custom_entity_test

that's 124 characters from root to the end of the final module name + 83 more characters to the end of the deepest module file I can find. That's 207 characters! Is that ok? It's also 8 "modules"-type directories deep - that's more likely the problem I imagine. What to do?

and

/static/d9/web/modules/contrib/webform/modules/webform_options_custom/tests/modules/webform_options_custom_test

I think those paths are too long or too many levels deep. Is htis a possibility?

Issue is also with webform at
https://www.drupal.org/project/webform/issues/3266338

Webform issue queue suggested it might be: https://www.drupal.org/project/drupal/issues/2985199
Extensions in Multisite Directories Not Registered When Rebuilding Cache

But I thought I'd check her about "tests" directory and number of directories of total depth and also total length of modules.

Do I need to be calling a different version of drush when workign with a drupal 9.3 site ?

Regards,

Ed

@EdNett
Copy link
Author

EdNett commented Feb 26, 2022

rather than asking you to rewrite tons of code so BOA d 9.3 users can use the webform module, how about this radical solution - which would also require you to rewrite code (most of the code could be converted very easily with a simple script - find and replace - ), but which has many benefits for both drupal, AEgir and BOA:

https://www.drupal.org/project/ideas/issues/3266661

@EdNett
Copy link
Author

EdNett commented Mar 22, 2022

I am still having this problem with only 1 site - and cloning or replicating the site and migrating it to a different platform still causes the same problem.

When I enable the webform module on a different site on the same platform, I get the following error (this is on a different site which before now did not have webform enabled):

drush updb -y
Schema information for module webform was missing from the database. You should manually [warning]
review the module updates and your database to check if any updates have been skipped up
to, and including, webform_update_8636().
No database updates required

Is there some simple "fix" where I can go into the database (I know data has to be unserialized, modified and then reserialized before saving into the databse (don't know exactly how this works but can figure it out) and simply set the webform module schema so that it is up-to-date and includes update_8636 ?

Thanks for any help. Must solve this problem.

Ed

@EdNett
Copy link
Author

EdNett commented Mar 22, 2022

do I need to be using a specific version of drush rather than the default "drush" for drupal 9.3+ core sites? If so, how do I call it when logged in as the o1.ftp user, please?

thanks

@EdNett
Copy link
Author

EdNett commented Mar 22, 2022

Perhaps this problem isn't with the webform module at all. I just got a similar error when updating to core 9.2.16 a social 11 platform:

drush updb
Schema information for module metatag_dc_advanced was missing from the database. You [warning]
should manually review the module updates and your database to check if any updates have
been skipped up to, and including, metatag_dc_advanced_update_8000().
Schema information for module metatag_pinterest was missing from the database. You should[warning]
manually review the module updates and your database to check if any updates have been
skipped up to, and including, metatag_pinterest_update_8000().
Schema information for module metatag_verification was missing from the database. You [warning]
should manually review the module updates and your database to check if any updates have
been skipped up to, and including, metatag_verification_update_8000().
Schema information for module redis was missing from the database. You should manually [warning]
review the module updates and your database to check if any updates have been skipped up
to, and including, redis_update_8000().
Schema information for module schema_organization was missing from the database. You [warning]
should manually review the module updates and your database to check if any updates have
been skipped up to, and including, schema_organization_update_8000().
Schema information for module schema_person was missing from the database. You should [warning]
manually review the module updates and your database to check if any updates have been
skipped up to, and including, schema_person_update_8000().
Schema information for module schema_web_page was missing from the database. You should [warning]
manually review the module updates and your database to check if any updates have been
skipped up to, and including, schema_web_page_update_8000().
Schema information for module schema_web_site was missing from the database. You should [warning]
manually review the module updates and your database to check if any updates have been
skipped up to, and including, schema_web_site_update_8000().
Schema information for module site_banner was missing from the database. You should [warning]
manually review the module updates and your database to check if any updates have been
skipped up to, and including, site_banner_update_8000().
Schema information for module xmlsitemap_engines was missing from the database. You [warning]
should manually review the module updates and your database to check if any updates have
been skipped up to, and including, xmlsitemap_engines_update_8000().
(Currently using Missing or invalid modules Array) [error]
Requirements check reports errors. Do you wish to continue? (y/n): y
The following updates are pending:

private_message module :
8007 - Enable notifications submodule.

profile module :
8003 - Removes the langcode key from the profile entity keys.
8004 - Add the uid entity key to profiles.
8005 - Rerun uid entity key addition after incorrect entity type fixed.
8006 - Install the data field.
8007 - Set the 'published' entity key.
8008 - Adds a storage schema for profile that adds a multi-column index.
8009 - Update revision fields.
8010 - Update the status field.

Do you wish to run all pending updates? (y/n): y
Error: Call to a member function hasKey() on null in profile_update_8003() (line 82 of [error]
/data/disk/o2/static/social11/html/modules/contrib/profile/profile.install) #0
/opt/tools/drush/8/drush/commands/core/drupal/update.inc(65): profile_update_8003()
#1 /opt/tools/drush/8/drush/commands/core/drupal/batch.inc(151): drush_update_do_one()
#2 /opt/tools/drush/8/drush/commands/core/drupal/batch.inc(97): _drush_batch_worker()
#3 /opt/tools/drush/8/drush/includes/batch.inc(99): _drush_batch_command()
#4 /opt/tools/drush/8/drush/commands/core/drupal/update.inc(239): drush_batch_command()
#5 /opt/tools/drush/8/drush/commands/core/core.drush.inc(1246): _update_batch_command()
#6 /opt/tools/drush/8/drush/includes/command.inc(422):
drush_core_updatedb_batch_process()
#7 /opt/tools/drush/8/drush/includes/command.inc(231): _drush_invoke_hooks()
#8 /opt/tools/drush/8/drush/includes/command.inc(199): drush_command()
#9 /opt/tools/drush/8/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch()
#10 /opt/tools/drush/8/drush/includes/preflight.inc(67):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#11 /opt/tools/drush/8/drush/drush.php(12): drush_main()
#12 {main}.
Error: Call to a member function hasKey() on null in profile_update_8003() (line 82 of /data/disk/o2/static/social11/html/modules/contrib/profile/profile.install).
Drush command terminated abnormally due to an unrecoverable error. [error]
Cache rebuild complete. [ok]
Finished performing updates.

The modules and sub-modules for which the errors and warnings, above are given, are indeed enabled for the site.

What does this mean?

@EdNett
Copy link
Author

EdNett commented Mar 22, 2022

Obviously it didn't perform any updates, even though it says "finished performing updates" at the end. This is on our production server. Boa info more here: https://gist.github.com/EdNett/29c455c1edb6151b3f16fbd5385a496f

Should I be expecting a total server meltdown because of these errors, or do I need to rebuild each site that has them? Any help understanding this issue would be appreciated.

thanks Ed

@EdNett EdNett changed the title Fresh intall of drupal 9.3 and Webform 6.1.3 - webform fails to update DB - path or directory problem ? Fresh intall of drupal 9.3.x site and various modules (webform, profile, private message, etc.) fail to update DB - all DB schema updates are shown as needed - " Schema information for module xx was missing from the database" error shown Mar 24, 2022
@EdNett EdNett changed the title Fresh intall of drupal 9.3.x site and various modules (webform, profile, private message, etc.) fail to update DB - all DB schema updates are shown as needed - " Schema information for module xx was missing from the database" error shown Fresh install of drupal 9.3.x site and various modules (webform, profile, private message, etc.) fail to update DB - all DB schema updates are shown as needed - " Schema information for module xx was missing from the database" error shown Mar 24, 2022
@EdNett
Copy link
Author

EdNett commented Jun 24, 2022

I am closing this - since it is outdated. The problem no longer exists, and I don't know what the cause was.

@EdNett EdNett closed this as completed Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant