PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'name'

Created on 30 January 2024, 10 months ago
Updated 17 February 2024, 9 months ago

Problem/Motivation

By default name of the saved search is the search query, but for sites, which allow long search phrase (> 255 characters), saving this search result in:

PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'name' at row 1: INSERT INTO {search_api_saved_search} ....

Proposed resolution

Trim name to max 255 characters before saving.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΈπŸ‡°Slovakia durifal

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