You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not possible to auto-create taxonomy terms that have parentheses in them, because Drupal interprets whatever is in the parentheses as the entity ID (even if it's non-numeric), resulting in the following error:
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "test" LINE 6: ...t_type')) AND ("taxonomy_term_field_data"."tid" IN ('test')) ^: SELECT "base_table"."revision_id" AS "revision_id", "base_table"."tid" AS "tid", "taxonomy_term_field_data_2"."name" AS "name" FROM "taxonomy_term_data" "base_table" INNER JOIN "taxonomy_term_field_data" "taxonomy_term_field_data" ON "taxonomy_term_field_data"."tid" = "base_table"."tid" LEFT JOIN "taxonomy_term_field_data" "taxonomy_term_field_data_2" ON "taxonomy_term_field_data_2"."tid" = "base_table"."tid" WHERE ("taxonomy_term_field_data"."vid" IN (:db_condition_placeholder_0)) AND ("taxonomy_term_field_data"."tid" IN (:db_condition_placeholder_1)) ORDER BY "taxonomy_term_field_data_2"."name" ASC NULLS FIRST; Array ( [:db_condition_placeholder_0] => plant_type [:db_condition_placeholder_1] => test ) in Drupal\Core\Entity\Query\Sql\Query->result() (line 271 of /opt/drupal/web/core/lib/Drupal/Core/Entity/Query/Sql/Query.php).
This also applies to existing terms, I think. In other words, if you have a term with parentheses in it already, the same error will occur if you try to reference it. (Need to confirm this.)
Describe the bug
It's not possible to auto-create taxonomy terms that have parentheses in them, because Drupal interprets whatever is in the parentheses as the entity ID (even if it's non-numeric), resulting in the following error:
This appears to be a Drupal core bug. I think this is it: https://www.drupal.org/project/drupal/issues/2924783
This is somewhat related to another recent bug: #502
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Terms with non-numeric text within parentheses should be created.
The text was updated successfully, but these errors were encountered: