When exposing Views filters it appears they are case-sensitive. The D7 solution found here also works on Combine.php in the D8 version of views: #1805272-37: Combine fields filter case-sensitive search

Modifying line 89 in core/modules/views/src/Plugin/views/filter/Combine.php removes the case-sensitivity.

Comments

cwightrun created an issue. See original summary.

geertvd’s picture

Category: Bug report » Feature request

Seems like a feature request to me.

dawehner’s picture

Well, depends what the user expects ... this might be more of a bug.

In case you want a case insensitive you can use the like operator

geertvd’s picture

Issue summary: View changes

Just tested this and for me the combine filter is actually not case sensitive when I have selected "Contains" as operator. When I select "Contains any" I get the following error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'CONCAT_WSnode_field_data.titlenode__body.body_value' in 'where clause': SELECT COUNT(*) AS expression FROM (SELECT 1 AS expression FROM {node_field_data} node_field_data LEFT JOIN {node__body} node__body ON node_field_data.nid = node__body.entity_id AND (node__body.deleted = :views_join_condition_0 AND node__body.langcode = node_field_data.langcode) WHERE (( (node_field_data.status = :db_condition_placeholder_0) AND( (CONCAT_WSnode_field_data.titlenode__body.body_value LIKE :db_condition_placeholder_1 ESCAPE '\\') OR (CONCAT_WSnode_field_data.titlenode__body.body_value LIKE :db_condition_placeholder_2 ESCAPE '\\') OR (CONCAT_WSnode_field_data.titlenode__body.body_value LIKE :db_condition_placeholder_3 ESCAPE '\\') )))) subquery; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => %facilisi% [:db_condition_placeholder_2] => %lobortis% [:db_condition_placeholder_3] => %mauris.% [:views_join_condition_0] => 0 )
geertvd’s picture

There's already a related issue for that previous error #1782678: "Combine fields" filter doesn't work with "Contains any word".

geertvd’s picture

So I can't really reproduce this one. @cwightrun can you add steps to reproduce?

cwightrun’s picture

Surely - forgive my fumbling through this reporting:

We have a View that displays taxonomy terms, and a filter for "Taxonomy Term: Name (exposed)":
https://dl.dropboxusercontent.com/spa/th0jyeygb5sj7u0/oeeitzcm.png

The exposed term name filter uses the "Contains" operator -> this filter is case-sensitive on our install (beta 14).
Edit: Adding screenshot - https://dl.dropboxusercontent.com/spa/th0jyeygb5sj7u0/pajmdod1.png

geertvd’s picture

Thanks for adding the steps to reproduce. Still unable to reproduce it though, perhaps someone else is able to.

lendude’s picture

Title: Views: Exposed filter is case sensitive » Option to make exposed filter case sensitive
Version: 8.0.0-beta14 » 8.3.x-dev

The bug part of this should be handled by #2664530: Views Combined fields filter with "Contains any word" or "Contains all words" operator results in an incorrect SQL query and a fatal error and #2784739: Fix PostgreSQL operator in views, where case sensitivity is dependant on the database used.

So remarking this more clearly as a feature request for allowing expicit case sensitive searching.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

kasey_mk’s picture

In case this is a helpful piece of info, my combo field was case-insensitive until I added a file URI field to it; then the combo field became case-sensitive.

anjali rathod’s picture

Assigned: Unassigned » anjali rathod

I will work on this issue. Currently I am planning to add a checkbox for case-sensitive check.

anjali rathod’s picture

Assigned: anjali rathod » Unassigned

Couldnt make any progress.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.