When using this module with views that have contextual filters there is a problem if there are any higher ascii characters (like emoji's) in the URL and the database is not configured for using the utf8mb4-collation.

In that case an error is thrown:

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[HY000]: General error: 1271 Illegal mix of collations for operation 'in':

(see core/modules/views/src/Plugin/views/style/StylePluginBase.php:230 tokenizeValue()).

The problem is that the name of the custom tag is not filtered with something like

preg_replace('/[\x00-\x1F\x80-\xFF]/', '',$value);

and in the subsequent database calls the "raw" value is used as value in the array in

SELECT tag, invalidations FROM {cachetags} WHERE tag IN ( :tags0, :tags1, :tags2 );

I do not know if this should be fixed in a more general way in views or in this module (and therefore have not included a patch).

Comments

louisnagtegaal created an issue. See original summary.

louisnagtegaal’s picture

I've added a small patch which cleans up the cache tag names before merging the cache tags. This prevents the SQL-error.