Media Library in Blökkli Editor is Empty When Using DB Search Server

Created on 31 March 2025, 8 days ago

Problem/Motivation

When switching from Elasticsearch to a DB-based search server, the Media Library in the Blökkli editor appears empty. This is due to a GraphQL typing error caused by $query->execute()->getResultCount() returning a string instead of an integer.:
Drupal\paragraphs_blokkli_search\Model\MediaLibrarySearchResults::__construct(): Argument #2 ($total) must be of type int, string given, called in /modules/contrib/paragraphs_blokkli/modules/paragraphs_blokkli_search_api/src/Plugin/ParagraphsBlokkli/Search/SearchApiMediaLibrary.php on line 154

Steps to reproduce

  • Configure the blokkli search index to use a DB search server.
  • Open the Media Library in the Blökkli editor.

Proposed resolution

Ensure the result count is correctly typecast to an integer before being returned to GraphQL.

🐛 Bug report
Status

Active

Version

1.3

Component

Code

Created by

🇨🇭Switzerland danielwirz

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

Comments & Activities

Production build 0.71.5 2024