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.
Replacement tokens from contextual filters are showing, but the fields used in the view aren't. You can still use them, but I think it should be clear to an user that this is the case. See screenshot for details.
Comment | File | Size | Author |
---|---|---|---|
#7 | 2780583-7.patch | 2.38 KB | Lendude |
#7 | 2780583-7-TEST_ONLY.patch | 1.68 KB | Lendude |
#5 | 2780583-5.drupal.views-area-tokens-list.patch | 717 bytes | joachim |
Schermafbeelding 2016-08-08 om 13.36.22.png | 119.98 KB | Nitebreed |
Comments
Comment #2
neutromancer CreditAttribution: neutromancer as a volunteer commentedI have the same issue, except I can't use the tokens that aren't shown.
This also happens when editing the view Title.
If I use the token before adding the Contextual Filter, it works even after I add it.
If I edit the Title, or Header and save, they stop working (displaying {{ title }} instead, for example), and I have to temporarily remove the contextual filter if I want to add these tokens again.
Comment #3
neutromancer CreditAttribution: neutromancer as a volunteer commentedComment #4
joachim CreditAttribution: joachim at Torchbox commentedThis is because the code to make the list of tokens is arranging them into groups, but then clobbering each group:
$form['tokens']['tokens'] is getting set each time, so earlier $type lists (where $type is fields, then arguments) get clobbered.
Patch coming.
Comment #5
joachim CreditAttribution: joachim at Torchbox commentedHere's a patch.
This affects all area handlers that use TokenizeAreaPluginBase, so the unfiltered one too.
Comment #6
LendudeFix looks great, but this still needs tests.
Comment #7
LendudeTest and fix.
Bug fix, so this can go against 8.2.x
Comment #9
dawehnerThe fix looks perfect for me!
I like that we don't use node but rather the test entity type.
Its kinda funny how bad this API is :)
Comment #12
catchCommitted/pushed to 8.3.x and cherry-picked to 8.2.x. Thanks!