Re-implement hook_tokens()

Created on 4 June 2015, over 9 years ago
Updated 8 September 2024, 2 months ago

Problem/Motivation

The body of hook_tokens() was commented out early in the porting process and hasn't been updated since.

Proposed resolution

Uncomment and update hook_tokens().

Remaining tasks

Create patch.
Create test for flag token functionality.

User interface changes

None.

API changes

Flag tokens would work again.

πŸ› Bug report
Status

Needs work

Version

4.0

Component

Token integration

Created by

πŸ‡ΊπŸ‡ΈUnited States socketwench

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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.

  • πŸ‡ΉπŸ‡­Thailand AlfTheCat

    Patch from #43 applies but it seems only to work for node flags. I'm trying to use a token in a flag link on a custom ECK entity and it's not working.

  • First commit to issue fork.
  • Merge request !72Re-implement hook_tokens() β†’ (Open) created by vensires
  • πŸ‡¬πŸ‡·Greece vensires

    Created MR!72 based on #44 πŸ› Re-implement hook_tokens() Needs work without any other change. Useful for the automated testing overview.

  • Pipeline finished with Failed
    2 months ago
    Total: 706s
    #276819
  • ivnish Kazakhstan

    MR needs rebase

  • Pipeline finished with Failed
    14 days ago
    Total: 238s
    #326927
  • πŸ‡¬πŸ‡·Greece vensires

    I am almost totally sure I didn't do the rebase correctly. Will retry later.

  • πŸ‡¬πŸ‡·Greece vensires

    Seems hook_tokens() was completely removed by commit 40257ad528474fa355cc91005f6fafd31a5435d7 in order to fix πŸ“Œ All coding standard fixes Active .
    I will add it back again but we will have to test whether in latest 8.x.4.x versions the tokens have been address in another more dynamic way.

  • Pipeline finished with Failed
    14 days ago
    Total: 199s
    #327303
  • πŸ‡¬πŸ‡·Greece vensires

    I have fixed the MR and reimplemented the changes manually to be as sure as I can that I got it all correctly. Please validate and try thoroughly!

    I also take the opportunity and remove the "Needs tests" tag since there are various comments that tests are fixed etc previously in this issue. The current tests have some @todo comment which someone might like to consider and maybe add the "Needs tests" tag back again.

  • First commit to issue fork.
  • Pipeline finished with Failed
    2 days ago
    Total: 239s
    #337610
  • Pipeline finished with Failed
    2 days ago
    Total: 153s
    #337712
  • Pipeline finished with Success
    2 days ago
    Total: 158s
    #337720
  • Pipeline finished with Success
    2 days ago
    Total: 156s
    #337741
Production build 0.71.5 2024