Repository navigation
Conversation
…air one left behind Deleting a search page left its autocomplete block in the theme. Creating the page again kept that block, which still pointed at the deleted page's UUID, so every page logged "Quant search block is missing its corresponding search page." and showed no header search box. The create form also counted the orphaned box and did not propose a new one. - hook_quant_search_page_delete() deletes the autocomplete blocks of the page. - The create form counts only search boxes whose page exists. - placeBlock() points a block of the same ID that a deleted page left behind at the new page (repairs sites that are already in that state).
This was referenced Nov 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Deleting a Quant search page left its autocomplete block in the theme. When the page was created again,
placeBlock()found the block by its ID and kept it, still pointing at the deleted page's UUID. Every page then logged:and showed no header search box. The create form also counted the orphaned box ("This theme already has a Quant search box") and did not tick "Add a search box".
Seen on the Tolmerra demo site on 10 Nov 2026 after deleting and re-creating
/site-searchwith 2.3.0.Fix
quant_search_quant_search_page_delete()deletes the autocomplete blocks whosepagesetting is the deleted page's UUID.placeBlock(): if a block with the same ID exists but its page does not, it points that block at the new page. This repairs sites that are already in that state.Tests
CreateSearchPageTest(functional):testDeletingThePageRemovesItsSearchBox: the block goes with the page, and the next create form proposes a box again.testStaleSearchBoxIsRepointed: an orphaned block (old UUID) does not count as a box, and creating the page points it at the new page.Both failed on
2.xbefore the fix: the block remained after the delete, and "place block" was unticked because of the orphaned box. Results with the fix:phpcs --standard=Drupalon modules/quant_search: clean.