Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Entity tokens of type integer are generated with a thousands separator. This is problematic when trying to use nid, or uid tokens. See #1295722: [commerce-order:uid] token formats user id as number as an example. The solution is not straight forward though, as having the separator is useful at other times.
Perhaps ids should be a separate type from integers?
Comment | File | Size | Author |
---|---|---|---|
#1 | entity-integer-number-format-1300066.patch | 479 bytes | twistor |
Comments
Comment #1
twistor CreditAttribution: twistor commentedHere's the patch for simply removing the thousands separator.
Comment #2
fagoWell, if you show the ids in a UI you still might want the number formatting. Anyway, let's just remove the integer formatting for now to fix popular use-cases like that one.
Once, we've no formatting there is no point in calling number_format though? So I've just removed that call + committed it. Please test.
Comment #3
tormiTested, #1 fixed a #1295722: [commerce-order:uid] token formats user id as number for me. Thanks!