Problem/Motivation

Installing Varbase Starter on a plain Drupal CMS base has never completed. The wiring script documents it as a known limit and tells people to use drush site:install instead, but that path fails too. There are two independent blockers, and both are fixable here.

Blocker 1 — missing node.search_index view mode.

  • Error: Call to a member function getConfigDependencyName() on null in Drupal\Core\Entity\EntityDisplayBase->calculateDependencies() (line 302)

The drupal_cms_search recipe imports core.entity_view_mode.node.search_index from the node module and then clones every default node view display into that mode. On Drupal 11.4 that view mode moved to the new search_node module, so the import silently no-ops (strict: false) and the clone targets a view mode that does not exist. Confirmed by instrumenting core: missing mode: entity_view_mode = node.search_index | display id=node.page.search_index bundle=page.

Varbase Starter cannot fix this in its own config/, because recipe dependencies are applied before the template's own config. The view mode has to come from a recipe that runs earlier.

Blocker 2 — the Canvas patch is discarded on Drupal CMS.

  • PHP Fatal error: Class Drupal\canvas_override\Storage\CanvasOverrideComponentTreeLoader cannot extend final class Drupal\canvas\Storage\ComponentTreeLoader

drupal/canvas 1.10.1 marks ComponentTreeLoader as final; drupal/canvas_override (required by varbase_content_base) extends it. Varbase Patches ships the re-roll that removes final, which is why the same package versions install fine on a Varbase base. On Drupal CMS the patch never applies, because scripts/assets/drupal-cms.composer.json sets ignore-dependency-patches: ["drupal/*", "drupal/ai_context"] — the drupal/* wildcard discards every Varbase-curated patch for every drupal/* package, not just the problematic one.

Steps to reproduce

  1. Build a Drupal CMS 2.1.3 project on Drupal 11.4.5.
  2. Run scripts/drupal-cms-wiring.php and require this recipe.
  3. Install, from the browser installer or with drush site:install drupal_cms_installer installer_site_template_form.add_ons=varbase_starter.
  4. The install fatals on blocker 1; clearing that, it fatals on blocker 2.

Proposed resolution

  1. Depend on Varbase Search Base and list it before Drupal CMS Search in recipe.yml, so the node.search_index view mode exists before the clone runs. The view mode itself is added in #3617240.
  2. Narrow ignore-dependency-patches in scripts/assets/drupal-cms.composer.json from ["drupal/*", "drupal/ai_context"] to just ["drupal/ai_context"], so the curated Varbase patches apply on Drupal CMS as they do on Varbase. Only drupal/ai_context genuinely needs ignoring: it declares a patch with a path relative to the project root that cannot resolve here.

Verified end to end on Drupal CMS 2.1.3 / Drupal 11.4.5 with both changes: Installation complete, vartheme_bs5 applied as the default theme, front page HTTP 200 anonymously, and zero errors in the log. The documented "known limit" no longer applies.

Search results page

Verified on a fresh Varbase 11 build with the site template installed (drush site:install varbase installer_site_template_form.add_ons=varbase_starter), searching for Varbase at /search?keywords=Varbase. The query itself works: 17 matches, 10 rows on page one, and a correct empty state for a term with no matches. The results page presentation still needs work.

  1. No page title. The page renders no <h1> at all. views.view.search defines title: Search, but no page title block renders on the route, so the document has no top level heading.
  2. No search box on the results page. display.page.display_options.exposed_block is true, so the exposed filter renders as a separate "Exposed form: search-page" block. Varbase Starter places that block only inside the header icon-toggle popover, which is collapsed on load. A visitor on the results page cannot see the term they searched for or refine it without reopening the header dropdown.
  3. Every row renders an empty heading. The row renders both title fields, title ("(Title) (node)") and title_1 ("Title (Canvas page)"), each wrapped in <h2> with hide_empty: false. A node row fills the first and leaves the second empty; a Canvas page row does the reverse. Every result therefore contains one empty <h2>.
  4. Result headings are oversized. Both title fields carry element_class: heading-responsive-3xl. That class has no rule in Vartheme BS5, so the rows fall back to the theme's default h2 size, 42px against 18px body text.
  5. No description and no read more. Each row is title plus search_api_excerpt and a single link on the title. The excerpt is raw indexed text and pulls in page chrome, for example "… Home Blog Insights, updates, and stories from the Varbase team. Latest Updates Search by Industry Select industry…" for a Canvas page and "… webmaster Submitted by we…" for a blog node.

Wanted: each result as title plus description with a read more link, at a small text size rather than display heading sizes.

Remaining tasks

  • ✅ Order Varbase Search Base before Drupal CMS Search
  • ✅ Narrow the ignored dependency patches so the Canvas patch applies
  • ✅ Verify a complete install on a plain Drupal CMS base
  • ❌ Update the known-limit note in the wiring script once released
  • ❌ Render a page title on the search results page
  • ❌ Show the search box on the search results page
  • ❌ Hide the empty title field so each row has one heading
  • ❌ Use small text sizes for the result title and description
  • ❌ Show title plus description with a read more link
  • ❌ Code review by maintainers
  • ✅ Release varbase_starter-1.0.0-rc1

User interface changes

Varbase Starter can now be picked in the Drupal CMS installer and completes successfully.

API changes

None.

Data model changes

Adds a dependency on the Varbase Search Base recipe.

Release notes snippet

Fixed installing Varbase Starter on a plain Drupal CMS base: ordered Varbase Search Base before Drupal CMS Search so the node search index view mode exists, and stopped discarding the curated Varbase Canvas patches.

Command icon 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

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Title: Varbase Starter cannot install on a plain Drupal CMS base: missing search_index view mode and discarded Canvas patch » Add the search index view modes and displays for the content types and taxonomy terms

  • rajab natshah committed fda20a42 on 1.0.x
    fix: #3617241 Add the search index view modes and displays for the...
rajab natshah’s picture

Issue summary: View changes

rajab natshah’s picture

Status: Active » Needs review

  • rajab natshah committed 852aa516 on 1.0.x
    fix: #3617241 Give the search results page a heading and one result per...
rajab natshah’s picture

Assigned: Unassigned » josebc
rajab natshah’s picture

Assigned: josebc » mohammed j. razem
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
Issue summary: View changes
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

rajab natshah’s picture

rajab natshah’s picture

Issue tags: +varbase-11.0.0-rc1

✅ Released varbase-11.0.0-rc1

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.