fix: #3617456 Create the header search block after the display that provides it

Recipes import everything under config/ before they run config.actions. The header region and the Canvas component for the header search box were shipped as config files, so both resolved the views_exposed_filter_block:search-block_1 block plugin while the block_1 display that provides it did not exist yet.

Two consequences, not one:

  • The install logged The "views_exposed_filter_block:search-block_1" block plugin was not found three times.
  • Canvas minted the component from the fallback plugin, so the header region stayed pinned to component version 435ec28df1ef5629 while the component re-minted to abd3c7419d413cec once the display did exist. The header shipped a stale pin on every install, the same defect class as #3617356.

What changed

  • views.view.search now uses setProperties instead of simpleConfigUpdate. This is a config entity, and simpleConfigUpdate on a config entity is deprecated in Drupal 11.2 and throws in Drupal 12. It also wrote the raw config object, leaving the view's caches untouched, so the new block display was not published as a block plugin in the same request. Saving the entity invalidates them.
  • The Canvas component and the header placement moved out of config/ into config.actions, ordered after the action that creates the block_1 display, which is the only order the block plugin can be resolved in.
  • config/canvas.component.block.views_exposed_filter_block.search-page.yml is removed. #3617241 turned the page display's exposed block off, so that plugin no longer exists after the recipe runs and the file only ever shipped dead config. Canvas still generates the component itself while the modules install; disabling it is not possible, because the entity no longer validates once its plugin is gone. Filed as #3617498 rather than held here.

Verification

Fresh drush site:install varbase installer_site_template_form.add_ons=varbase_starter on Varbase 11, before and after:

Check Before After
Block plugin warnings during install 3 0
Component active_version abd3c7419d413cec abd3c7419d413cec
Component versions retained active, 435ec28df1ef5629 active
Header region pin 435ec28df1ef5629 (stale) abd3c7419d413cec (matches)
Install result complete complete

Search feature unchanged and re-checked on the installed site: 17 results with Canvas pages present, exactly one <h1>, order h1 → form → count → rows, filter bar with input and ghost submit on one line, one heading and one link per row, zero empty headings, uniform 48px row gaps, header toggle and search input intact, broken blocks 0, 0 console errors, no PageViewBuilder exceptions.

Local green-gate with gitlab-ci-local: Composer validate, YAML lint, Cspell, ESLint and Cucumber dry-run all pass.

AI-Generated: Yes

Checkpoints

  • File an issue about this project
  • Addition/Change/Update/Fix to this project
  • Testing to ensure no regression
  • Automated unit/functional testing coverage
  • Developer Documentation support on feature change/addition
  • User Guide Documentation support on feature change/addition
  • UX/UI designer responsibilities
  • Accessibility and Readability
  • Reviewed by a human
  • Code review by maintainers
  • Full testing and approval
  • Credit contributors
  • Review with the product owner
  • Update Release Notes
  • Release
Edited by Rajab Natshah

Merge request reports

Loading