fix: #3621848 Point the header search box at the search page's own exposed block so the Component keeps its dependencies

Issue: https://www.drupal.org/project/horizonaid/issues/3621848

The header pointed at views_exposed_filter_block:search-block_1, a Views exposed-filter block over a block_1 display that the recipe creates in a config ACTION. Drupal\Core\Recipe\RecipeRunner::processConfiguration() runs a recipe's config actions AFTER installing its config, so the derivative did not exist when the Canvas Component naming it was saved: BlockManager fell back to the broken plugin, logged the warning three times, and — the part that outlives the install — saved the Component with no dependencies at all.

canvas.component.block.views_exposed_filter_block.search-block_1:dependencies: {  }
canvas.component.block.views_exposed_filter_block.blog-all:dependencies:
  config: [views.view.blog]
  module: [views]

drush cr does not repair it; Canvas only re-saves a Component when its version hash or metadata changes.

This MR points the header at the page display's own exposed block, views_exposed_filter_block:search-page, which Drupal CMS Search already ships with exposed_block: true — so the derivative exists before the recipe's config is installed:

  • config/canvas.component.block.views_exposed_filter_block.search-block_1.yml → ...search-page.yml, at version 435ec28df1ef5629, with its real dependencies.
  • config/canvas.page_region.vartheme_bs5_horizonaid.header.yml names it in its dependencies and its component tree.
  • The views.view.search config action loses the block_1 display and the display.page.display_options.exposed_block: false override. Everything else it sets — placeholder, label, text_input_required, row style, header — is unchanged.

Side effect worth calling out: /search used to render two search boxes (the header block plus the page display's inline exposed form). It now renders one. The theme's own icon-toggle component already documents this shape — "the 'Exposed form: search-page' block for a search toggle".

Verified on a clean Drupal CMS 2.1.4 + Horizon Aid build:

warnings: 0
canvas.component.block.views_exposed_filter_block.search-page:dependencies:
  config: [views.view.search]
  module: [views]
front page: renders views-exposed-form-search-page
/search: renders it exactly once, HTTP 200, returns results

AI-Generated: Yes

Checkpoints:

  • File an issue
  • Addition/Change/Update/Fix
  • Testing to ensure no regression
  • Automated unit testing coverage
  • Automated functional testing coverage
  • UX/UI designer responsibilities
  • Readability
  • Accessibility
  • Performance
  • Security
  • Developer Documentation
  • User Guide Documentation
  • Reviewed by human
  • Code review by maintainers
  • Full testing and approval
  • Credit contributors
  • Review with the product owner
  • Release notes snippet
  • Release

Merge request reports

Loading
Loading