Combine fields filter REGEXP causes PostgreSQL syntax error

Created on 16 January 2024, 10 months ago
Updated 14 March 2024, 9 months ago

Steps to reproduce

1. Use PostgreSQL as database connection.
2. On a view, add a combine fields filter.
2. Add regular expression as an operator.
3. Select field(s) for filtering.

Expected Behaviour:
The filter should apply the regular expression operator without causing errors.

Actual Behaviour:
The following syntax error is given:SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "REGEXP"

Proposed Solution/Patch:
In the opRegex function in web/core/modules/views/src/Plugin/views/filter/Combine.php, the REGEXP operator is hard coded into the expression. The proposed patch will use the condition operator feature to ensure the compatible operator with PostgreSQL is used instead.

πŸ› Bug report
Status

Fixed

Version

10.2 ✨

Component
ViewsΒ  β†’

Last updated 2 days ago

Created by

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024