Problem/Motivation
Search module is being deprecated so move all the search related code from the Node module to the Search module.
core/modules/node/config/install/core.entity_view_mode.node.search_index.yml
core/modules/node/config/install/core.entity_view_mode.node.search_result.yml
core/modules/node/config/optional/search.page.node_search.yml
core/modules/node/config/schema/node.schema.yml
Steps to reproduce
Proposed resolution
Create a sub module search_node for the moved code.
Remaining tasks
Deprecate the search plugin
Other changes as needed
Move tests for node searching to the new module
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3587564
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 #3
quietone commentedMoved user_search plugin and config from the user module to a sub module in Search, search_user. That is working and a manual test of updating worked as well.
Did the same for node module, moving that to search_node. A manual test of update fails, with
The "node_search" plugin does not exist. There is also more search related code in the node module that should move.Comment #4
quietone commentedThere was a cspell error that was not detected by commit-code-check locally, It was in core/modules/search/modules/search_node/config/schema/search_node.schema.yml.
Comment #5
quietone commentedComment #6
quietone commentedSetting to needs review to see how this is going. Reviews should pay attention to all the configuration changes. I am not sure they are correct.
There are tests in the Search module that can probably be moved to search_node, I just haven't looked at that yet.
Comment #8
smustgrave commentedApplied the change suggested by @berdir, did it directly in the UI as it was pretty straight forward. Tests are still clean and manually testing and update hook ran fine.
Comment #11
catchCommitted/pushed to main, thanks!
Will need a backport MR for 11.x
Comment #13
smustgrave commentedSeems like a good backport to 11.x to me, all green.
Comment #14
catchCommitted/pushed to 11.x and 11.4.x, thanks!
Comment #19
smustgrave commentedNot sure if this should be re-opened but discovered an issue on 11.4.0-rc1
When I attempt to uninstall search. search_help and search_node get uninstalled and then I get an error that node_search plugin doesn't exist. Believe it's because the search_node did not cleanup the search page tied to it.
Comment #20
godotislateWonder if this similar to #3581109: Move HelpSearch to Search sub-module in that the update hook that installs the new submodule needs to go in system.install, so that it runs before others.
Or maybe we just revert for now.Can't revert since it's in RC1.
Comment #21
catchDon't think we can revert this now it's already in the RC - people might already be running the RC.
Are we missing an update to set the new dependencies for the node search page?
Also think @godotislate is right that we need to move the update to system.install. will need to leave an empty update where it currently is.
Comment #22
smustgrave commentedI only found it after updating to rc1 on a lower environment.
We are migrating to Drupal 11 and taking the time to review some modules and was uninstalling search.
I would of thought uninstalling search_node would of deleted the content search page
Comment #23
godotislateI think I misread #19 wrong, and I thought it was about the update process. I think the move to system.install might still be needed to prevent some other update hook rebuilding routing before search_node is installed.
But having issues uninstalled search after the update is a separate thing. After a quick look at the commit, I think the issue might be that the module dependency in
search.page.node_searchis not changed fromnodetosearch_nodein active configuration.Comment #25
godotislateMR for changes per #23: https://git.drupalcode.org/project/drupal/-/merge_requests/16070
We probably need a manual test of an update from 11.4.0-rc1 to the MR branch as well.
Comment #26
smustgrave commentedThat was 100% the reason
Comment #27
smustgrave commentedAlso realized the same may need to open for search_help right?
Comment #28
catch@smustgrave did you also test this?
I think we should do that to ensure that the new update runs fine on a site that has already run the previous update. It looks good to me, but so did the original update that we committed tbh.
Comment #29
smustgrave commented@catch yup!
So I had already written a custom hook to delete the search pages so what I did was reinstall the 3 modules (search, search_node, search_help).
Exported the config
Altered the content page to depend on search
Imported the config
Tried to uninstall search and I get the error.
Applied the patch
Ran the update
Search uninstalls fine now.
Comment #30
godotislateI think
search_helpwas fine because the search page for help already had a dependency on search.Comment #32
catchCommitted/pushed to main, thanks!
We need a backport MR for 11.x/11.4.x
Comment #35
godotislateMR for 11.x https://git.drupalcode.org/project/drupal/-/merge_requests/16076
Applies to 11.4.x as well.
Not sure if the warning about the Validatable config job failure has any significance.
Comment #39
catchVery much doubt it.
Committed/pushed the backport MR to 11.x and 11.4.x, thanks!