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."

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

richsky’s picture

Issue summary: View changes

Edit

crutch’s picture

Issue summary: View changes

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

daiwik.addweb’s picture

FileSize
1.37 KB
12.08 KB
12.1 KB

PFA patch. Hope that works for you too.

Thanks!

daiwik.addweb’s picture

Status: Active » Needs review
crutch’s picture

Yes fixed thanks :)

daiwik.addweb’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, please commit the patch and would be awaiting for credit :)

polynya’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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