Can't upload MacOS screenshot

Created on 18 November 2024, about 1 month ago

Problem/Motivation

MacOS uses a weird narrow no-break space (NNBSP) character right before the PM in their screenshot file names like Screenshot 2024-11-18 at 3.16.37β€―PM.png.

General error: 1267 Illegal mix of collations (ascii_general_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation ...

Steps to reproduce

Try to upload a screenshot, it no workie.

Proposed resolution

Let's strip all the weird space characters.

πŸ› Bug report
Status

RTBC

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States tim bozeman

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

Comments & Activities

  • Issue created by @tim bozeman
  • πŸ‡ΊπŸ‡ΈUnited States tim bozeman
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • πŸ‡¦πŸ‡ΉAustria eameyers

    @tim_bozeman Tim Bozeman, we have a similar error but at an upload from a zip file.
    These are the errors

    Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (ascii_general_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '=': UPDATE "inline_block_usage" SET "layout_entity_type"=:db_update_placeholder_0, "layout_entity_id"=:db_update_placeholder_1 WHERE ("layout_entity_type" = :db_condition_placeholder_0) AND ("layout_entity_id" = :db_condition_placeholder_1); Array ( [:db_update_placeholder_0] => [:db_update_placeholder_1] => [:db_condition_placeholder_0] => file_resup [:db_condition_placeholder_1] => 1-375101266-1732120946280-test_v1.0.0_2024-11-19.zip ) in Drupal\layout_builder\InlineBlockUsage->removeByLayoutEntity() (line 64 of /var/www/html/core/modules/layout_builder/src/InlineBlockUsage.php).

    Drupal\Core\Entity\EntityStorageException: SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (ascii_general_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '=': UPDATE "inline_block_usage" SET "layout_entity_type"=:db_update_placeholder_0, "layout_entity_id"=:db_update_placeholder_1 WHERE ("layout_entity_type" = :db_condition_placeholder_0) AND ("layout_entity_id" = :db_condition_placeholder_1); Array ( [:db_update_placeholder_0] => [:db_update_placeholder_1] => [:db_condition_placeholder_0] => file_resup [:db_condition_placeholder_1] => 1-375101266-1732120946280-test_v1.0.0_2024-11-19.zip ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->delete() (line 763 of /var/www/html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

    We have the 2.0.2 version, do you have any tips?

  • πŸ‡ΊπŸ‡ΈUnited States tim bozeman

    Have you narrowed down what character is the issue? Maybe there’s a way to detect invalid characters in a generic way. πŸ€”

Production build 0.71.5 2024