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.
Token machine name doesn't accept underscores, but hyphens. The field description says: "A unique machine-readable name for this token. It must only contain lowercase letters, numbers, and underscores."
Comment | File | Size | Author |
---|---|---|---|
#2 | before.png | 12.1 KB | daiwik.addweb |
#2 | after.png | 12.08 KB | daiwik.addweb |
#2 | hyphen-1980256-2.patch | 1.37 KB | daiwik.addweb |
Comments
Comment #0.0
richsky CreditAttribution: richsky commentedEdit
Comment #1
crutch CreditAttribution: crutch commentedYes, this text description needs to be fixed when editing the the machine name of the custom token. When opening the field to edit it, the description says:
Token machine name
A unique machine-readable name for this token. It must only contain lowercase letters, numbers, and underscores.
but when using underscores, it returns an error saying:
"The machine-readable name must contain only lowercase letters, numbers, and hyphens."
Very minor but could be confusing to some.
Comment #2
daiwik.addweb CreditAttribution: daiwik.addweb at AddWeb Solution Pvt. Ltd. commentedPFA patch. Hope that works for you too.
Thanks!
Comment #3
daiwik.addweb CreditAttribution: daiwik.addweb at AddWeb Solution Pvt. Ltd. commentedComment #4
crutch CreditAttribution: crutch commentedYes fixed thanks :)
Comment #5
daiwik.addweb CreditAttribution: daiwik.addweb at AddWeb Solution Pvt. Ltd. commentedThanks, please commit the patch and would be awaiting for credit :)
Comment #7
polynya CreditAttribution: polynya as a volunteer commented