Problem/Motivation

The recipe_label base field on the recipe_tracker_log entity is defined with ->setSetting('is_ascii', TRUE), which causes Drupal to create the underlying database column with CHARACTER SET ascii. This prevents storing recipe names that contain non-ASCII characters.

Any recipe whose name in recipe.yml contains accented or multibyte characters (e.g. Content Privée) causes a fatal database error when the recipe is applied:

  Incorrect string value: '\xC3\xA9e' for column `db`.`recipe_tracker_log`.`recipe_label`
  at row 1

package_name and version are correctly marked is_ascii=TRUE since Composer package names and version strings are always ASCII. The recipe_label field stores the human-readable recipe name, which has no such constraint.

Steps to reproduce

1. Install the recipe_tracker module.
2. Create a recipe whose recipe.yml contains a non-ASCII name, e.g.:
name: 'Content Privée'
3. Apply the recipe via Drush or the UI.
4. Observe the database

Proposed resolution

Remove ->setSetting('is_ascii', TRUE) from the recipe_label field definition in Drupal\recipe_tracker\Entity\Log::baseFieldDefinitions().

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

zaporylie created an issue. See original summary.

zaporylie’s picture

Status: Active » Needs review

  • zaporylie committed 4563e048 on 1.x
    feat: #3579986 recipe_label field uses is_ascii=TRUE preventing non-...
zaporylie’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.