"Undefined array key" error could occur

Created on 19 May 2025, 16 days ago

Problem/Motivation

The following PHP warning could occur when the free text search not set in a page request. This could happen an error screen when invalid input was provided.

Warning: Undefined array key "searchtext" in views_filters_summary_search_api_views_filters_summary_replacements_alter() (line 32 of modules/contrib/views_filters_summary/modules/views_filters_summary_search_api/views_filters_summary_search_api.module).

views_filters_summary_search_api_views_filters_summary_replacements_alter() (Line: 552)
Drupal\Core\Extension\ModuleHandler->alter() (Line: 455)
Drupal\views_filters_summary\Plugin\views\area\ViewsFiltersSummary->defineReplacements() (Line: 515)
Drupal\views_filters_summary\Plugin\views\area\ViewsFiltersSummary->buildReplacements() (Line: 265)
Drupal\views_filters_summary\Plugin\views\area\ViewsFiltersSummary->render() (Line: 2289)
Drupal\views\Plugin\views\display\DisplayPluginBase->renderArea() (Line: 2234)
Drupal\views\Plugin\views\display\DisplayPluginBase->elementPreRender()

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇭🇺Hungary mxr576 Hungary

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

Comments & Activities

Production build 0.71.5 2024