Database Search Results module triggers Type Error on installation

Created on 26 April 2025, 14 days ago

Problem/Motivation

Trying to install the Database Search Defaults module results in WSOD.

With WebProfiler installed it seen that it is TypeError - HTTP 500 Internal Server Error.

Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type string, null given, called in /var/www/html/web/core/lib/Drupal/Component/Render/FormattableMarkup.php on line 238

Steps to reproduce

Install Drupal CMS

Goto the Extend UI and try to install it, by selecting it and click install.

Proposed resolution

The WSOD is related to the absence of the Comment module which it depends on.
If the Comment module is installed before hand the error doesn't occur.

The module also depends on the non-existent Article type which was probably present in earlier versions of Drupal

If it depends on a specific Article type then that specific Article type should be installed by default, or it should depend on a module that creates that Article type.

The Basic page article type seems too spartan in any case.

The resolution is to track down why a WSOD is triggered if the Comment module is not enabled and fix it, and also to install the Article type by default.

User interface changes

Configuration changes

πŸ› Bug report
Status

Active

Component

General

Created by

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

Comments & Activities

  • Issue created by @vfclists
  • πŸ‡ͺπŸ‡ΈSpain penyaskito Seville πŸ’ƒ, Spain πŸ‡ͺπŸ‡Έ, UTC+2 πŸ‡ͺπŸ‡Ί

    There's no recipe where we install the module search_api_db_defaults directly, so I guess we can't do nothing about it.
    This is something that should be fixed in search_api. I've found #3009624: Can not install "Database Search Defaults" because the field comment is missing β†’ .

    You mentioned that you had to install the comment module, but I can see they have the dependency already?

  • You mentioned that you had to install the comment module, but I can see they have the dependency already?

    Although the comment label is a dependency of the module, the WSOD occurs if the comment module is not installed beforehand.

    It also depends on an Article content type which is also not present and will not work without it.

    The point here is Drupal CMS is supposed to be a curated system where the recipes and recommended modules are supposed to be tested for compatibility and reliability before being put together, and not cause WSODs as a consequence.

    If the Search API and its sample are not installed as a part of core or necessary to evaluate Drupal CMS, then they should be removed from the distribution, and additional documentation created to warn of the possibility of problems with it if installed.

    I will raise a bug report on the Search API issue queue if it hasn't been reported yet.

  • You mentioned that you had to install the comment module, but I can see they have the dependency already?

    Although the comment module is listed as a dependency of Database Search Defaults the WSOD occurs if it is not installed beforehand. It needs to be installed if the WSOD is not to occur.

    The module also requires the Article content type which has been removed from recent versions of Drupal to be present to work in any case, so its inclusion in Drupal CMS is questionable.

    The point here is Drupal CMS is supposed to be a curated set of modules which are expected to work together without causing WSODs.

    If Search API is something added to the Drupal CMS distribution rather than something which comes with core, then the Database Search Defaults should be disabled if it is automatically pulled in by the Search API until it is fixed upstream.

  • You mentioned that you had to install the comment module, but I can see they have the dependency already?

    Although the comment module is listed as a dependency of Database Search Defaults the WSOD occurs if it is not installed beforehand. It needs to be installed if the WSOD is not to occur.

    The module also requires an Article content type to be present before it works in any case, so its inclusion in Drupal CMS is questionable.

    The point here is Drupal CMS is supposed to be a curated set of modules which are expected to work together without causing WSODs.

    If Search API is something added to the Drupal CMS distribution rather than something which comes with core, then the Database Search Defaults should be disabled if it is automatically pulled in by the Search API until it is fixed upstream.

  • You mentioned that you had to install the comment module, but I can see they have the dependency already?

    Although the comment module is listed as a dependency of Database Search Defaults the WSOD occurs if it is not installed beforehand. It needs to be installed if the WSOD is not to occur.

    The module also requires an Article content type to be present before it works in any case, so its inclusion in Drupal CMS is questionable.

    The point here is Drupal CMS is supposed to be a curated set of modules which are expected to work together without causing WSODs.

    If Search API is something added to the Drupal CMS distribution rather than something which comes with core, then the Database Search Defaults should be disabled if it is automatically pulled in by the Search API until it is fixed upstream.

  • You mentioned that you had to install the comment module, but I can see they have the dependency already?

    Although the comment module is listed as a dependency of Database Search Defaults the WSOD occurs if it is not installed beforehand. It needs to be installed if the WSOD is not to occur.

    The module also requires an Article content type to be present before it works in any case, so its inclusion in Drupal CMS is questionable.

    The point here is Drupal CMS is supposed to be a curated set of modules which are expected to work together without causing WSODs.

    If Search API is something added to the Drupal CMS distribution rather than something which comes with core, then the Database Search Defaults should be disabled if it is automatically pulled in by the Search API until it is fixed upstream.

  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    The point here is Drupal CMS is supposed to be a curated set of modules which are expected to work together without causing WSODs.

    This is true, but we can't account for every possible combination of every possible module that other modules depend on (or include as submodules). We have no control over that.

    What we do have control over, and what we do stand behind, is that the modules we install as part of our recipes -- "install" meaning it's actually activated in Drupal, rather just sitting inert in the codebase -- should work together.

    So if we are not enabling Search API DB Defaults, despite it being shipped with Search API (which, again, we cannot control) -- and there's a bug in it, that would make it squarely a bug in Search API and needs to be fixed there.

Production build 0.71.5 2024