The hook_token_info() documentation does not specify that token descriptions are optional, but as a best practice descriptions should never be required if there already is a shorter human-readable label/title available (what more is there to say about a node title than "Title", for instance?). I maintain several modules that follow this practice, and I've received reports from users that Token.module keeps telling them about these missing descriptions.

I was hoping you could remove this check and consider a missing or empty description as valid. See #1941552: [Policy, no patch] Never require descriptions if a title/label is already required and #1911768: Make token and token type descriptions optional for related core issues.

Comments

Xano’s picture

I just noticed that one of those users also reported this problem in the Token queue: #1958570: currency and taxonomy.

Dave Reid’s picture

Status: Active » Postponed

The API says they are required. Just using an empty string is ok. I'm ok changing that it can be optional in D8 and if it's backported, then I'm ok changing it in Token.