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?

CommentFileSizeAuthor
#1 entity-integer-number-format-1300066.patch479 bytestwistor
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

twistor’s picture

Status: Active » Needs review
FileSize
479 bytes

Here's the patch for simply removing the thousands separator.

fago’s picture

Status: Needs review » Fixed

Well, 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.

tormi’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.