Date tokens do not handle all date types

Created on 31 May 2011, about 14 years ago
Updated 23 December 2023, over 1 year ago

system_token_info and system_tokens() only provide the 'short', 'medium' or 'long' type tokens, but do not use system_get_date_types() to define what tokens are available. Therefore any module-defined or custom date types do not get tokens. I'm working on adding this support in Token.module for Drupal 7 in the meantime, but we should fix this is core as well.

πŸ› Bug report
Status

Needs review

Version

10.2 ✨

Component
TokenΒ  β†’

Last updated 1 day ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States dave reid Nebraska USA

Live updates comments and jobs are added and updated live.
  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¨πŸ‡¦Canada franceslui

    I re-roll it to 10.2.x.

  • Status changed to Needs work over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Could the issue summary be updated to the standard template.

    Also recommend opening an MR as those are quicker to review and test.

    Changing back to 11.x as the current development branch.

  • πŸ‡¦πŸ‡ΊAustralia geoffreyr Sydney, AU / Gadigal country

    Issue summary updated as of #79.

    Might have a crack at rolling the most recent patch into 11.x.

  • Merge request !115211137306: Reroll latest patches against 11.x β†’ (Open) created by geoffreyr
  • Pipeline finished with Failed
    4 months ago
    Total: 172s
    #451200
  • Pipeline finished with Failed
    4 months ago
    Total: 104s
    #451204
  • πŸ‡¦πŸ‡ΊAustralia geoffreyr Sydney, AU / Gadigal country
  • Pipeline finished with Success
    4 months ago
    Total: 669s
    #451206
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    There a concern if there a large number of date formats

  • Status changed to Needs review 21 days ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Following up on comment above

  • πŸ‡¦πŸ‡ΊAustralia darvanen Sydney, Australia

    @smustgrave I don't personally see why there would be, tokens are already a sprawling hierarchy with hundreds if not thousands of derivatives once you include the token module. Also once they're defined I think they're pretty lightweight.

    I also see a core committer has interacted with this patch and didn't raise any concerns at the time.

Production build 0.71.5 2024