System Information:
- Sulu Version: 2.5.18
- RedirectBundle Version: 2.1.4
- PHP Version: 8.2.27
- Database: PostgreSQL 15
- Doctrine orm Version: ^2.5.3
Description:
When searching for redirects using the RedirectBundle, an SQL error occurs due to filtering a BOOLEAN field with LIKE. This issue appears to be related to PostgreSQL 15, which enforces stricter type checks.
Description:
`An exception occurred while executing a query: SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean ~~ unknown
LINE 1: ...t_routes r0_ WHERE (r0_.id LIKE $1 OR r0_.enabled LIKE $2 OR...
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.`
Steps to Reproduce:
- Use PostgreSQL 15 as the database
- Install Sulu with the RedirectBundle
- Search for redirects via Admin
- The error occurs because r0_.enabled (a BOOLEAN field) is being compared using LIKE
Expected Behavior:
The query should execute without errors. The search should be usable.
Possible Solutions:
- Modify the query to avoid using LIKE on BOOLEAN fields
- Explicitly cast BOOLEAN to TEXT in Doctrine (CAST(r.enabled AS TEXT))
Thanks for any help
System Information:
Description:
When searching for redirects using the RedirectBundle, an SQL error occurs due to filtering a BOOLEAN field with LIKE. This issue appears to be related to PostgreSQL 15, which enforces stricter type checks.
Description:
Steps to Reproduce:
Expected Behavior:
The query should execute without errors. The search should be usable.
Possible Solutions:
Thanks for any help