Problem/Motivation
@joachim noted that various api.php files mention search. These are the ones I found:
✅ theme.api.php — 6 references, all in documentation examples:
- Lines 51-77: Uses search_result as the example theme hook for hook_theme() — the whole code block example
- Lines 96-97: "to override the display of search results, a theme would add search-result.html.twig"
- Lines 142-155: Uses item_list__search_results as the example for __SUGGESTION syntax, and explains search_theme_suggestions_search_result()
- Lines 1222-1223: Uses search_result as the example for how template names are derived
✅ entity.api.php — 2 areas:
- Lines 318-325: Bullet list in "Other entity hooks" section listing hook_node_search_ranking(), hook_node_search_result(), "Search indexing nodes"
- Lines 1819-1820: hook_entity_view_display_alter example code uses search_index view mode — should use a different view mode to explain
✅ node.api.php — 3 search-specific hooks documented: hook_node_search_result(), hook_node_update_index(), hook_node_search_ranking() — these are defined by the search_node submodule, so they belong there
✅ toolbar.api.php — the hook_toolbar() example just happens to add a generic HTML field to the toolbar, and 'library' => ['search/global'] — that's a hypothetical custom search/global library, not the search module. This is fine as-is.
✅ core.api.php — references to the search plugin system in the plugin architecture docs (lines 1321, 1351, 1406-1407) — these are part of explaining the plugin system using search as an example.
Steps to reproduce
Proposed resolution
Remove/move/update search mentions in api.php files
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
LLM disclosure
LLM was used to detail the findings and to resolve them. With human review.
| Comment | File | Size | Author |
|---|
Issue fork drupal-3614996
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:
- 3614996-removemoveupdate-search-mentions
changes, plain diff MR !16567
Comments
Comment #3
gábor hojtsyProposed MR.
Comment #4
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #5
smustgrave commentedBot you are wrong! MR seems fine to me. Good replacements, going to go on a limb and mark.
Comment #6
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #7
gábor hojtsyFix misstated result in issue summary, does not change RTCB status though :)
Comment #8
gábor hojtsyComment #9
smustgrave commenteddon't know why the bot is picking on this issue.
Comment #10
quietone commented@smustgrave, if the bot is running commit-code-check.sh, the PHPStan check always fails when the only files changes are *.api.php, as is done in this issue.
Comment #11
smustgrave commentedNever knew that. Learn something new everyday!
Comment #12
larowlanCommitted to main, doesn't apply cleanly to 11.x - setting at Patch (to be ported)
Comment #13
quietone commentedActually, I don't think this should be backported because Search will still be in 11.x where this documentation will be valid.
Comment #14
gábor hojtsyI think it does not hurt to leave 11.5 as-is, although if other docs things are backported that would be make it easier if this is backported too first.
That said I think most of the updates are just different examples for implementing hooks, so either search or other things as in the MR are valid examples. Also the search node moved hooks would also be valid in the search node submodule now in Drupal 11.
The main thing that would be lost is the 12 lines of "other entity hooks" which is the first hunk in the MR, I can see the clear reason not to backport that one hunk :)
Comment #16
larowlanThanks for pointing out that I didn't push this one @quietone
Have done so now.
Marking as fixed as we don't want to backport per the above.