Problem/Motivation
During my update of drupal core v11.3.13 to v11.4.1 (or v11.4.0), I encountered hook_update errors associated with the new search_help & search_node along with the help_search_items table existing or not existing.
Edit: fixed a typo (help_search -> search_help)
Drupal v11.3.13 -> Drupal 11.4.x
PHP v8.3.6
Steps to reproduce
In a currently functioning Drupal 11.3.13 site I started my core upgrades to v11.4.x:
- $ composer update -W --dry-run
- $ composer update -W
- $ composer dump-autoload (to pick up the symfony/runtime plugin)
- $ composer drupal:scaffold
- $ drush updatedb
At this stage I see a myriad of updates and proceed. However, the first update fails reporting that "node_search" does not exist.
I proceed to enable the search_node module manually and rerun $ drush updatedb. This further fails as the help_search_items table is no longer found as its removed in system_update_11400(). But, isn't getting rebuilt when help_search is enabled - I think?
$ drush updatedb
-------------------- ------------ --------------- ----------------------------
Module Update ID Type Description
-------------------- ------------ --------------- ----------------------------
system 11400 hook_update_n 11400 - Install Help
Search module if the
Search and Help modules
are installed.
system 11401 hook_update_n 11401 - Install Search
node module if node and
search are installed.
search 11400 hook_update_n 11400 - Install Search
Node and Search and Node
are installed.
announcements_feed migrate_la post-update Migrates last fetch
st_fetch_s timestamp from State API
tate_to_ke to keyvalue storage.
yvalue
field clear_purg post-update Removes the
e_batch_si purge_batch_size config.
ze
help search_hel post-update Update config entity
p_dependen dependencies to the Search
cies Help module, if necessary.
@see
system_update_11400()
olivero remove_sho post-update Remove shortcut settings
rtcut_sett if shortcut module is not
ings_if_no installed.
t_installe
d
system migrate_co post-update Migrate to new compress
mpress_set setting.
ting
system remove_non post-update Remove non-admin routes
_admin_rou state key.
tes_state
-------------------- ------------ --------------- ----------------------------
┌ Do you wish to run the specified pending updates? ───────────┐
│ ● Yes / ○ No │
└──────────────────────────────────────────────────────────────┘
> [notice] Update started: system_update_11400
> [error] The "node_search" plugin does not exist. Valid plugin IDs for Drupal\search\SearchPluginManager are: google_cse_search, help_search, user_search
> [error] Update failed: system_update_11400
[error] Update aborted by: system_update_11400
[error] Finished performing updates.
In DiscoveryTrait.php line 53:
The "node_search" plugin does not exist. Valid plugin IDs for Drupal\search\SearchPluginManager are: google_cse_search, help_search
, user_search
$ drush pm:install search_node
[success] Module search_node has been installed.
$ drush updatedb
-------------------- ------------ --------------- ----------------------------
Module Update ID Type Description
-------------------- ------------ --------------- ----------------------------
system 11400 hook_update_n 11400 - Install Help
Search module if the
Search and Help modules
are installed.
system 11401 hook_update_n 11401 - Install Search
node module if node and
search are installed.
search 11400 hook_update_n 11400 - Install Search
Node and Search and Node
are installed.
announcements_feed migrate_la post-update Migrates last fetch
st_fetch_s timestamp from State API
tate_to_ke to keyvalue storage.
yvalue
field clear_purg post-update Removes the
e_batch_si purge_batch_size config.
ze
help search_hel post-update Update config entity
p_dependen dependencies to the Search
cies Help module, if necessary.
@see
system_update_11400()
olivero remove_sho post-update Remove shortcut settings
rtcut_sett if shortcut module is not
ings_if_no installed.
t_installe
d
system migrate_co post-update Migrate to new compress
mpress_set setting.
ting
system remove_non post-update Remove non-admin routes
_admin_rou state key.
tes_state
-------------------- ------------ --------------- ----------------------------
┌ Do you wish to run the specified pending updates? ───────────┐
│ ● Yes / ○ No │
└──────────────────────────────────────────────────────────────┘
> [notice] Update started: system_update_11400
> [notice] Update completed: system_update_11400
> [notice] Update started: system_update_11401
> [notice] Update completed: system_update_11401
> [notice] Update started: search_update_11400
> [notice] Update completed: search_update_11400
>
> In ExceptionHandler.php line 96:
>
> SQLSTATE[42S02]: Base table or view not found: 1146 Table 'lol_d11.help_sea
> rch_items' doesn't exist: SELECT "hsi"."sid" AS "sid", "hsi"."topic_id" AS
> "topic_id", "hsi"."section_plugin_id" AS "section_plugin_id", "hsi"."permis
> sion" AS "permission"
> FROM
> "help_search_items" "hsi"; Array
> (
> )
>
>
> In PdoTrait.php line 109:
>
> SQLSTATE[42S02]: Base table or view not found: 1146 Table 'lol_d11.help_sea
> rch_items' doesn't exist
>
>
In ProcessBase.php line 155:
Output is empty.
$ drush sql:query "CREATE TABLE IF NOT EXISTS help_search_items (sid INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Numeric index of this item in the search index', section_plugin_id VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'The help section the item comes from', permission VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'The permission needed to view this item', topic_id VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'The topic ID of the item', PRIMARY KEY (sid), INDEX section_plugin_id (section_plugin_id), INDEX topic_id (topic_id) ) ENGINE=InnoDB;"
$ drush updatedb
-------------------- ------------- ------------- -----------------------------
Module Update ID Type Description
-------------------- ------------- ------------- -----------------------------
announcements_feed migrate_las post-update Migrates last fetch
t_fetch_sta timestamp from State API to
te_to_keyva keyvalue storage.
lue
field clear_purge post-update Removes the
_batch_size purge_batch_size config.
help search_help post-update Update config entity
_dependenci dependencies to the Search
es Help module, if necessary.
@see system_update_11400()
olivero remove_shor post-update Remove shortcut settings if
tcut_settin shortcut module is not
gs_if_not_i installed.
nstalled
system migrate_com post-update Migrate to new compress
press_setti setting.
ng
system remove_non_ post-update Remove non-admin routes
admin_route state key.
s_state
-------------------- ------------- ------------- -----------------------------
┌ Do you wish to run the specified pending updates? ───────────┐
│ ● Yes / ○ No │
└──────────────────────────────────────────────────────────────┘
> [notice] Update started: announcements_feed_post_update_migrate_last_fetch_state_to_keyvalue
> [notice] Update completed: announcements_feed_post_update_migrate_last_fetch_state_to_keyvalue
> [notice] Update started: field_post_update_clear_purge_batch_size
> [notice] Update completed: field_post_update_clear_purge_batch_size
> [notice] Update started: help_post_update_search_help_dependencies
> [notice] Update completed: help_post_update_search_help_dependencies
> [notice] Update started: olivero_post_update_remove_shortcut_settings_if_not_installed
> [notice] Update completed: olivero_post_update_remove_shortcut_settings_if_not_installed
> [notice] Update started: system_post_update_migrate_compress_setting
> [notice] Update completed: system_post_update_migrate_compress_setting
> [notice] Update started: system_post_update_remove_non_admin_routes_state
> [notice] Update completed: system_post_update_remove_non_admin_routes_state
[success] Finished performing updates.
Issue fork drupal-3608710
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
cilefen commentedDoes running a cache rebuild before the schema update resolve this?
Comment #3
jjeffrie commentedComment #4
cilefen commentedComment #5
jjeffrie commentedRunning $ drush cr prior to the $ drush updatedb command did not work, it reported this error:
Edit -> Fixed the error message.
Comment #6
catchComment #7
catchThere are two errors reported here - the table not existing, and the help_search plugin not being found. It's not clear if those are two independent issues or if one leads to the other.
The help_search_items issue can be resolved by applying the pattern in #3221051: [meta] Replace hook_schema() implementations with ::ensureTableExists() and dropping search_help_schema(), that would mean the update also doesn't need to drop the database table in the first place.
Going to retitle this to cover the missing table, and open another issue for the plugin.
Comment #9
catchComment #10
catchWorking on this in #3608912: Move search updates back to search module and fix missing plugin errors, turns out we may need to tackle all the search-related update issues in one place.
Comment #11
dadderley commentedI managed to get the update done after a few foiled attempts. All seemed good until I tried the search.
I got a load of errors indicating a problem with search and a WSOD.
So I reinstalled core.
There were problems with search_help. I had to uninstall it to proceed.
I also posted this on the forum page below, but this is a better place.
[SOLVED] Issue upgrading from 11.3.13 to 11.4
https://www.drupal.org/forum/support/upgrading-drupal/2026-07-03/solved-...
mysite@ctweb10:~/sites/mysite.org_NLYrwSS9EhFYJex6xUTVmw# composer reinstall "drupal/core-*"
- Removing drupal/core-recommended (11.4.1)
- Removing drupal/core-project-message (11.4.1)
- Removing drupal/core-composer-scaffold (11.4.1)
- Downloading drupal/core-composer-scaffold (11.4.1)
- Downloading drupal/core-project-message (11.4.1)
- Installing drupal/core-composer-scaffold (11.4.1): Extracting archive
- Installing drupal/core-project-message (11.4.1): Extracting archive
- Installing drupal/core-recommended (11.4.1)
* Homepage: https://www.drupal.org/project/drupal
* Support:
* docs: https://www.drupal.org/docs/user_guide/en/index.html
* chat: https://www.drupal.org/node/314178
Wed Jul 08 12:25:33
mysite@ctweb10:~/sites/mysite.org_NLYrwSS9EhFYJex6xUTVmw# drush updb
[warning] Schema information for module search_help was missing from the database. You should manually review the module updates and your database to check if any updates have been skipped up to, and including, search_help_update_8000().
[warning] Schema information for module search_node was missing from the database. You should manually review the module updates and your database to check if any updates have been skipped up to, and including, search_node_update_8000().
[error] (Currently using Removed core module You must add the following contributed module and reload this page.
* Action UI [1]
This module is installed on your site but is no longer provided by Core.
For more information read the documentation on deprecated modules. [2]
[1] https://www.drupal.org/project/action
[2] https://www.drupal.org/node/3223395#s-recommendations-for-deprecated-mod...
)
┌ Requirements check reports errors. Do you wish to continue? ─┐
│ Yes │
└──────────────────────────────────────────────────────────────┘
-------------------- ------------ --------------- ----------------------------
Module Update ID Type Description
-------------------- ------------ --------------- ----------------------------
system 11400 hook_update_n 11400 - Install Help
Search module if the
Search and Help modules
are installed.
system 11401 hook_update_n 11401 - Install Search
node module if node and
search are installed.
search 11400 hook_update_n 11400 - Install Search
Node and Search and Node
are installed.
announcements_feed migrate_la post-update Migrates last fetch
st_fetch_s timestamp from State API
tate_to_ke to keyvalue storage.
yvalue
field clear_purg post-update Removes the
e_batch_si purge_batch_size config.
ze
help search_hel post-update Update config entity
p_dependen dependencies to the Search
cies Help module, if necessary.
@see
system_update_11400()
olivero remove_sho post-update Remove shortcut settings
rtcut_sett if shortcut module is not
ings_if_no installed.
t_installe
d
system migrate_co post-update Migrate to new compress
mpress_set setting.
ting
system remove_non post-update Remove non-admin routes
_admin_rou state key.
tes_state
-------------------- ------------ --------------- ----------------------------
┌ Do you wish to run the specified pending updates? ───────────┐
│ Yes │
└──────────────────────────────────────────────────────────────┘
[notice] Module action has an entry in the system.schema key/value storage, but is missing from your site. More information about this error.
> [notice] Update started: system_update_11400
> [notice] Update completed: system_update_11400
> [notice] Update started: system_update_11401
> [notice] Update completed: system_update_11401
> [notice] Update started: search_update_11400
> [notice] Update completed: search_update_11400
>
> In ExceptionHandler.php line 96:
>
> SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite.org
> _NLYrwSS9EhFYJex6xUTVmw.help_search_items' doesn't exist: SELECT "hsi"."sid
> " AS "sid", "hsi"."topic_id" AS "topic_id", "hsi"."section_plugin_id" AS "s
> ection_plugin_id", "hsi"."permission" AS "permission"
> FROM
> "help_search_items" "hsi"; Array
> (
> )
>
>
> In PdoTrait.php line 109:
>
> SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite.org
> _NLYrwSS9EhFYJex6xUTVmw.help_search_items' doesn't exist
>
>
In ProcessBase.php line 155:
Output is empty.
Wed Jul 08 12:26:44
mysite@ctweb10:~/sites/mysite.org_NLYrwSS9EhFYJex6xUTVmw# composer require 'drupal/action:^0.2'
./composer.json has been updated
Running composer update drupal/action
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
- Locking drupal/action (0.2.2)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Downloading drupal/action (0.2.2)
- Installing drupal/action (0.2.2): Extracting archive
Generating autoload files
53 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
Wed Jul 08 12:26:57
mysite@ctweb10:~/sites/mysite.org_NLYrwSS9EhFYJex6xUTVmw# drush updb
-------------------- ------------- ------------- -----------------------------
Module Update ID Type Description
-------------------- ------------- ------------- -----------------------------
announcements_feed migrate_las post-update Migrates last fetch
t_fetch_sta timestamp from State API to
te_to_keyva keyvalue storage.
lue
field clear_purge post-update Removes the
_batch_size purge_batch_size config.
help search_help post-update Update config entity
_dependenci dependencies to the Search
es Help module, if necessary.
@see system_update_11400()
olivero remove_shor post-update Remove shortcut settings if
tcut_settin shortcut module is not
gs_if_not_i installed.
nstalled
system migrate_com post-update Migrate to new compress
press_setti setting.
ng
system remove_non_ post-update Remove non-admin routes
admin_route state key.
s_state
-------------------- ------------- ------------- -----------------------------
┌ Do you wish to run the specified pending updates? ───────────┐
│ Yes │
└──────────────────────────────────────────────────────────────┘
> [notice] Update started: announcements_feed_post_update_migrate_last_fetch_state_to_keyvalue
> [notice] Update completed: announcements_feed_post_update_migrate_last_fetch_state_to_keyvalue
> [notice] Update started: field_post_update_clear_purge_batch_size
> [notice] Update completed: field_post_update_clear_purge_batch_size
> [notice] Update started: help_post_update_search_help_dependencies
> [notice] Update completed: help_post_update_search_help_dependencies
> [notice] Update started: olivero_post_update_remove_shortcut_settings_if_not_installed
> [notice] Update completed: olivero_post_update_remove_shortcut_settings_if_not_installed
> [notice] Update started: system_post_update_migrate_compress_setting
> [notice] Update completed: system_post_update_migrate_compress_setting
> [notice] Update started: system_post_update_remove_non_admin_routes_state
> [notice] Update completed: system_post_update_remove_non_admin_routes_state
[success] Finished performing updates.
In ExceptionHandler.php line 96:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite.org_NLYrwSS9EhFYJex6xUTVmw.help_search_item
s' doesn't exist: SELECT "hsi"."sid" AS "sid", "hsi"."topic_id" AS "topic_id", "hsi"."section_plugin_id" AS "sectio
n_plugin_id", "hsi"."permission" AS "permission"
FROM
"help_search_items" "hsi"; Array
(
)
In PdoTrait.php line 109:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite.org_NLYrwSS9EhFYJex6xUTVmw.help_search_item
s' doesn't exist
Wed Jul 08 12:27:20
mysite@ctweb10:~/sites/mysite.org_NLYrwSS9EhFYJex6xUTVmw# drush cr
In ExceptionHandler.php line 96:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite.org_NLYrwSS9EhFYJex6xUTVmw.help_search_item
s' doesn't exist: SELECT "hsi"."sid" AS "sid", "hsi"."topic_id" AS "topic_id", "hsi"."section_plugin_id" AS "sectio
n_plugin_id", "hsi"."permission" AS "permission"
FROM
"help_search_items" "hsi"; Array
(
)
In PdoTrait.php line 109:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite.org_NLYrwSS9EhFYJex6xUTVmw.help_search_item
s' doesn't exist
Wed Jul 08 12:27:34
mysite@ctweb10:~/sites/mysite.org_NLYrwSS9EhFYJex6xUTVmw# drush ws
-------- -------------- ------ ---------- ----------------------------------------------------------------------------
ID Date Type Severity Message
-------- -------------- ------ ---------- ----------------------------------------------------------------------------
340042 08/Jul 12:30 php Error Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table
or view not found: 1146 Table
'mysite.org_NLYrwSS9EhFYJex6xUTVmw.help_search_items' doesn't exist:
SELECT "
340041 08/Jul 12:30 php Error Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table
or view not found: 1146 Table
'mysite.org_NLYrwSS9EhFYJex6xUTVmw.help_search_items' doesn't exist:
SELECT "
340040 08/Jul 12:29 php Error Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table
or view not found: 1146 Table
'mysite.org_NLYrwSS9EhFYJex6xUTVmw.help_search_items' doesn't exist:
SELECT "
340039 08/Jul 12:29 cron Info Cron run completed.
340038 08/Jul 12:29 cron Info Execution of webform_cron() took 21.28ms.
340037 08/Jul 12:29 cron Info Starting execution of webform_cron(), execution of update_cron() took
14.83ms.
340036 08/Jul 12:29 cron Info Starting execution of update_cron(), execution of system_cron() took
35.46ms.
340035 08/Jul 12:29 cron Info Starting execution of system_cron(), execution of smart_date_recur_cron()
took 0.33ms.
340034 08/Jul 12:29 cron Info Starting execution of smart_date_recur_cron(), execution of
search_node_cron() took 11.53ms.
340033 08/Jul 12:29 cron Info Starting execution of search_node_cron(), execution of search_cron() took
17.14ms.
-------- -------------- ------ ---------- ----------------------------------------------------------------------------
Wed Jul 08 12:31:24
mysite@ctweb10:~/sites/mysite.org_NLYrwSS9EhFYJex6xUTVmw# drush updb
[success] No pending updates.
In ExceptionHandler.php line 96:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite.org_NLYrwSS9EhFYJex6xUTVmw.help_search_item
s' doesn't exist: SELECT "hsi"."sid" AS "sid", "hsi"."topic_id" AS "topic_id", "hsi"."section_plugin_id" AS "sectio
n_plugin_id", "hsi"."permission" AS "permission"
FROM
"help_search_items" "hsi"; Array
(
)
In PdoTrait.php line 109:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite.org_NLYrwSS9EhFYJex6xUTVmw.help_search_item
s' doesn't exist
Wed Jul 08 12:32:18
mysite@ctweb10:~/sites/mysite.org_NLYrwSS9EhFYJex6xUTVmw# drush pmu search_help
[success] Successfully uninstalled: search_help
Wed Jul 08 12:33:42
mysite@ctweb10:~/sites/mysite.org_NLYrwSS9EhFYJex6xUTVmw# drush cr
[success] Cache rebuild complete.
Wed Jul 08 12:33:57
mysite@ctweb10:~/sites/mysite.org_NLYrwSS9EhFYJex6xUTVmw# drush updb
[success] No pending updates.
Wed Jul 08 12:35:55
mysite@ctweb10:~/sites/mysite.org_NLYrwSS9EhFYJex6xUTVmw# drush cr
[success] Cache rebuild complete.