Runtime exception in search indexing when adding a Views block

Created on 8 March 2024, 10 months ago

Problem/Motivation

When you use Layout Builder to add a Views block to a page, the system throws a "headers already sent" error when Search API tries to index it.

RuntimeException while trying to render item entity:node/1:en with view mode full for search index Database Node Index: Failed to start the session because headers have already been sent by "/var/www/html/vendor/symfony/http-foundation/Response.php" at line 431. in Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (line 132 of /var/www/html/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php).

Steps to reproduce

  1. Install the latest 3.0.x branch of Panopoly with its starter content.
  2. Log in as an administrator.
  3. Visit one of the starter pages.
  4. Go to the Layout tab.
  5. Add a Content List widget to a section.
  6. Accept all of the default configuration and save the widget.
  7. Save the layout.
  8. Visit /admin/reports/dblog.
  9. Note there is a Search API exception associated with when you saved the page.
  10. Clear the search index by visiting /admin/config/search/search-api/index/panopoly_search_db_node_index and activating the "Clear all indexed items" button.
  11. Re-index the site content by activating the "Index now" button.
  12. Visit /admin/reports/dblog.
  13. Note there is no runtime exception associated with re-indexing.

The exception does not occur when adding a non-Views block such as a text or file widget.

Proposed resolution

TBD.

Remaining tasks

Test on a standard install of Drupal with only the required modules configured?

User interface changes

None.

API changes

TBD.

Data model changes

TBD.

πŸ› Bug report
Status

Active

Version

3.0

Component

Search

Created by

πŸ‡ΊπŸ‡ΈUnited States cboyden

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024