AJAX link broken if flaggable entity id is string

Created on 9 May 2023, about 1 year ago
Updated 18 May 2023, about 1 year ago

Problem/Motivation

We use an entity which id's is a string and can contain capital characters.
I noticed that twig uses "clean_class" ('\Drupal\Component\Utility\Html::getClass') but in controller we use Html::cleanCssIdentifier.
This causes that js and markup uses different class and user can not flag/unflag entity.
The following error is generated: "An error occurred during the execution of the Ajax response: Error: Syntax error, unrecognized expression ..."

Proposed resolution

Use getClass in both places so we have exactly the same class name.

πŸ› Bug report
Status

RTBC

Component

Flag core

Created by

πŸ‡΅πŸ‡±Poland alorenc Wolsztyn, πŸ‡΅πŸ‡±

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

Comments & Activities

Production build 0.69.0 2024