Data too long for column 'ordinal'

Created on 7 September 2024, 6 months ago
Updated 20 September 2024, 5 months ago

Problem/Motivation

I am new to this module. I use drupal 10.3.3 and the latest dev version of this module.
I added quite some hierarchy nodes (bundle: persoon) and created a new view on this bundle with only two fields: title and hierarchy content - child of: child summary.
Trying to run the view results in this error message:

SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'ordinal' at row 131: SELECT "node_field_data"."nid" AS "nid" FROM "node_field_data" "node_field_data" LEFT JOIN (WITH RECURSIVE ancestors AS ( SELECT ancestors_base.nid AS id, eh_first.field_kind_target_id AS targetId, ancestors_base.nid as root_id, ancestors_base.langcode as langcode, 0 as depth, CONCAT(CHAR(length(CONV(ancestors_base.nid, 10, 36)) + ORD('0') -1 ), CONV(ancestors_base.nid, 10, 36)) as ordinal, ancestors_base.vid AS revision_id FROM "node_field_data" as ancestors_base LEFT JOIN "node__field_kind" eh_first ON eh_first.entity_id = ancestors_base.nid AND eh_first.langcode = ancestors_base.langcode WHERE eh_first.entity_id IS NULL UNION ALL SELECT ancestors_base.entity_id, ancestors_base.field_kind_target_id, ancestors.root_id, ancestors_base.langcode, ancestors.depth + 1, CONCAT(ancestors.ordinal, '/', CONCAT(CHAR(length(CONV(100 + field_kind_weight, 10, 36)) + ORD('0') -1 ), CONV(100+ field_kind_weight, 10, 36)), '/', CONCAT(CHAR(length(CONV(ancestors_base.field_kind_target_id, 10, 36)) + ORD('0') -1 ), CONV(ancestors_base.field_kind_target_id, 10, 36))), ancestors_base.revision_id FROM "node__field_kind" ancestors_base JOIN ancestors ON ancestors_base.field_kind_target_id=ancestors.id AND ancestors_base.langcode=ancestors.langcode )SELECT id, root_id, langcode, revision_id, depth, ordinal FROM ancestors) "nested_set_field_kind_node" ON node_field_data.vid = nested_set_field_kind_node.revision_id WHERE ("node_field_data"."status" = :db_condition_placeholder_0) AND ("node_field_data"."type" IN (:db_condition_placeholder_1)) LIMIT 5 OFFSET 0; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => persoon )

Attached is the view.

πŸ› Bug report
Status

Needs review

Version

5.0

Component

Code (module)

Created by

πŸ‡³πŸ‡±Netherlands promes

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024