Query condition 'bs.id IN ()' cannot be empty" after install

Created on 9 July 2025, 3 months ago

Problem/Motivation

This error is thrown after a clean drupal install and enabling the module:

Drupal\Core\Database\InvalidQueryException: Query condition 'bs.id IN ()' cannot be empty. in Drupal\Core\Database\Query\Condition->condition() (line 107 of core/lib/Drupal/Core/Database/Query/Condition.php).
Drupal\Core\Database\Query\Select->condition() (Line: 46)
babel_js_alter() (Line: 472)
Drupal\Core\Extension\ModuleHandler->alter() (Line: 369)
Drupal\Core\Asset\AssetResolver->getJsAssets() (Line: 295)
Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAssetLibraries() (Line: 132)
Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAttachments() (Line: 97)
...

Steps to reproduce

- ddev drush si -y && ddev drush en babel -y
- visit any page like the homepage, we get the error

Proposed resolution

The issue comes from babel_js_alter, exit early if $sids is empty.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium herved

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024