Closed (fixed)
Project:
Metatag
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Jul 2016 at 15:32 UTC
Updated:
28 Aug 2016 at 01:34 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
hussainwebURL is a type of token and hence it shows up over there (similar to Array, date, random, etc). I haven't seen metatag code but it probably needs to set
'show_nested'toFALSEto not show these token types.Comment #3
berdirurl needs a url, so I think metatag (incorrectly) defines that it has a url, that's why it shows up.
Comment #4
berdirComment #5
damienmckenna@icicleking: Please explain where you saw that popup? The module passes different arguments to the token browser depending upon where it's called for.
Comment #6
damienmckennaHere's what Metatag is doing to generate the token browser link:
a) What should it be? b) Is there a difference between the options available to the last release of the Token module and what's currently in -dev? c) When will the next release of Token be?
Comment #7
damienmckennaOh hey, I just saw that Token 8.x-1.0-beta1 is out - awesome work Berdir (and everyone)!
Comment #8
damienmckennaIs this the correct way of doing it?
Comment #9
berdirThe default empty value is an empty array, not NULL. I'd just change the default value of your method to [], then you can remove the condition and just pass along $token_types.
Also, you specify a lot of default options. There isn't really a need to have them. It doesn't hurt, but when I look at that, I assume you override the default, which is not the case.
The only thing you need is #theme and #token_types.
The first part in the patch looks unrelated?
Comment #10
damienmckenna@berdir: Thanks for the feedback.
The first part of the patch fixes a problem where it wasn't passing in the correct entity type to the browser for the global configurations, basically the existing code didn't work correctly.
I'll try a new patch with fewer options and see how it works.
Comment #11
damienmckennaThis appears to still work correctly, what do you think?
Comment #12
berdirLooks ok to me. you might need to update the @param docs for the argument, in case that mentioned null somehow.
Comment #13
damienmckennaSome minor improvements, mostly focused on the $token_types argument handling.
Comment #15
damienmckennaCommitted. Thanks for your help!