Install

Works with Drupal: ^10.3 || ^11 || ^12

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 187.64 KB
MD5: c80afefedb0079c0fdc1c90c35fb5b33
SHA-1: 4879e8e11144d213814d5feef42f7e9dfc836f19
SHA-256: d5cdc9d17c279d36ca038c02222953d4e4a974526ae5484ee78f8df28868cbae
Download zip 278.45 KB
MD5: 526d634557504cffd318948277b90199
SHA-1: 1763c5bcfa128f4fa9d366e62cb56db4ba2efcee
SHA-256: 8baee124e7bd88e95b5002d6e9fb4eeeb12acd4319f6a62fabd1dfadb063cc73

Release notes

This release carries everything intended for 1.0.0-beta1, which was tagged but never published. If you are coming from 1.0.0-alpha2, this is your upgrade — there is nothing in between that you missed.

83 commits since 1.0.0-alpha2: three new capabilities, a broad security and correctness pass, and two blocker fixes for large sites.

Compatible with Drupal 10.3+, 11 and 12; PHP 8.1+.

Fixed in beta2

drush pagefind:index is invokable again.

On Drush 13 the command could not be run at all. Its docblock carried @param array<string, mixed> $options alongside @command, and Drush's legacy annotation parser splits that generic on its comma — registering a required positional argument literally named array<string,. Every invocation failed with:

Not enough arguments (missing: "array<string,").

pagefind:reindex and pagefind:debug carry no such @param, which is why only the one command the documentation recommends for larger sites was affected.

All three Drush commands now register through #[CLI\Command] attributes, removing the annotation parser from the path entirely rather than dodging a single generic. Names, aliases and behaviour are unchanged.

Together with the indexing timeout fix below, this means large-site indexing works from the command line for the first time in the 1.0.x line.

New features

  • Multisite search collections. Merge the Pagefind indexes of other Pagefind-powered sites into a single faceted search experience. Configure remote index URLs under Configuration » Search and metadata » Pagefind (validated, one per line). Applies to React search displays; see the enterprise-features documentation for the CORS and index-version requirements.
  • Featured results on faceted displays. Promoted ("Best Bets") results now render as a pinned featured card on the React display, not just the legacy search page and block. Query-scoped (exact term match), hidden when facets are active, with no raw-HTML injection.
  • Self-healing synonyms. Editing synonyms automatically queues a coalesced re-stage of affected content on the next cron run, with a dashboard call-to-action — no manual rebuild required for synonym changes to take effect.
  • Ranking parity on React displays. The relevance ranking controls (term frequency, term similarity, page length, term saturation) now apply to React displays, matching the legacy search surfaces.
  • Guided Setup Wizard. A step-by-step path from install to a working search, reachable from the dashboard.

Security and correctness

  • Removed content now leaves the index. Unpublishing or deleting a node rebuilds (or queues a rebuild of) the live index, so a removed node's title, URL and excerpt no longer remain publicly searchable until an unrelated rebuild happens.
  • Reliable large-site index builds. The Pagefind binary now runs with a configurable timeout — the new index_timeout setting, default 3600 seconds, 0 for unlimited — instead of Symfony Process's 60-second default, which previously caused index builds on larger sites to fail. The threshold is lower than it sounds: on network-backed storage a 20,000-page index can take several minutes, and the 60-second wall is reached at roughly 5,000–6,000 pages.
  • Concurrent builds serialized. A cross-process lock prevents two simultaneous index builds from corrupting the live index directory; a build that finds the lock held queues a single coalesced rebuild via cron rather than interleaving.
  • Featured-results access check. Promoted results skip nodes the anonymous user cannot view, so unpublished or access-restricted promoted content no longer leaks its title and URL.
  • Frontend hardening. Display HTML-escaping now covers single quotes and backticks (attribute-context safety); crafted URL state (page size, page number, filter keys) is clamped and prototype-polluting keys are rejected; search failures surface an error instead of silently showing stale results.
  • Binary discovery hardening. A Pagefind binary placed in the public files directory is detected and logged as a warning but never executed — the module runs the binary only from the private filesystem.
  • Synonym store integrity. Synonym deletion acquires its lock before truncating the store, preventing a concurrent reader from observing an empty file.
  • Setup Wizard hardening. Closed a privilege-escalation path, a duplicate-ID crash, an Enter-key navigation bug, and config clobbering between steps.

Accessibility

  • Meets WCAG non-text contrast, focus visibility and reduced-motion requirements.
  • Row action buttons carry row-specific accessible names via aria-label.
  • AJAX row changes are announced to assistive technology.
  • The legacy search input is properly labelled.
  • A documented accessibility statement ships in ACCESSIBILITY.md.

Performance

  • Faster indexing. Synonym configuration is memoized instead of being re-read and JSON-parsed once per staged entity; the Drush indexing loop resets the entity static cache per chunk, bounding memory on large-site rebuilds.
  • Smaller frontend bundle. Modern browser targets reduce the display bundle by roughly 17% (~43 KB → ~35.7 KB).

Bug fixes and robustness

  • The legacy search behaviour initializes once per page (via core/once) instead of re-importing the engine and re-dispatching events on every AJAX attach.
  • Deferred (shutdown-time) staging exceptions are logged instead of silently swallowed.
  • Index-build outcomes are reported honestly in the dashboard, Drush output, logs and the status report.
  • Display paths are validated (leading slash, uniqueness) before save.
  • Grid layout regressions and sidebar-right mobile stacking fixed.
  • A failed index build flags a cron rebuild so the change is retried.
  • Guarded against a nullable EntityTypeInterface from getDefinition().

Documentation and developer experience

  • Reorganized, audience-oriented documentation set under docs/, with the README acting as a router.
  • Added CHANGELOG.md and an honest ACCESSIBILITY.md.
  • Corrected documentation on the drupalSettings.pagefind namespace, the real synonym lifecycle (index-time, not search-time), the security and access model, promoted results, permissions and result counts.
  • The GrumPHP pre-commit hook degrades gracefully instead of blocking every commit when no DDEV sibling project is found.
  • The frontend ships a vitest harness with unit-tested helpers.

Quality

  • Kernel suite: 121 tests, 1337 assertions, 0 failures (up from 98 / 1091), including new coverage for removal propagation, index timeout, build locking, the binary argument/output contract, promoted-result access and synonym self-healing.
  • PHPStan level 8 and Drupal / DrupalPractice coding standards: clean.
  • Frontend: 38 vitest tests.

Upgrade notes

  • New settings, all optional with safe defaults: index_timeout (default 3600 seconds, 0 = unlimited) and multisite_urls (default empty). No manual config migration is required.
  • No database schema changes and no update hooks.
  • Binary location: if you previously relied on placing the Pagefind binary under public://, move it to private:// or set a custom binary path — the public location is detected but no longer executed.
  • Recommended: run a one-time full index rebuild after upgrading (dashboard or drush pagefind:index) so existing indexes pick up the removal-propagation and ranking changes. On Drush 13 that command works again as of this release.
Created by: mayankguptadotcom
Created on: 9 Aug 2026 at 15:15 UTC
Last updated: 9 Aug 2026 at 15:15 UTC
Bug fixes
New features

Other releases