Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I use this module in a simple Drupal setup to ensure the uniqueness of node titles.
There are two problems, however.
- Node titles are compared case insensitively. This is related to #333137: Case sensitivity (uppercase and lowercase should not be considered unique).
- Accented characters are equal to their non-accented pairs (e.g. é=e).
This means that ménes is equal to menés which is clearly wrong.
The problem depends on the string types in the MySQL tables. See case sensitivity in string searches.
I assume that certain setups are not affected because they create database tables with binary strings.
I think the module should ensure that strings are compared using BINARY string representations.
See the BINARY Operator.
The solution is simple: $qwhere = "BINARY node.title = '". db_escape_string($values) ."' ";
I think other text fields should also be treated this way.