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.
I get this error:
Uncaught TypeError: Object [object Object] has no method 'treeTable'
The token dialog renders, but the table inside it is (of course) extremely tall, containing all of the available tokens, and there are no links to copy/paste tokens.
Comment | File | Size | Author |
---|---|---|---|
#11 | token-2023423-11.patch | 3.5 KB | Dmitriy.trt |
|
Comments
Comment #1
pjcdawkins CreditAttribution: pjcdawkins commentedI attempted to fix this by adding:
inside theme_token_tree_link().
Then the first level of the tree renders properly, but on clicking to expand a single row, I get the error:
Comment #2
chekka.de CreditAttribution: chekka.de commentedsame, same!
Comment #3
pjcdawkins CreditAttribution: pjcdawkins commentedSince it's a JavaScript error I wonder if this is something to do with jQuery Update (the site is running jQuery 1.8 and jQuery UI 1.10.2).
Comment #3.0
pjcdawkins CreditAttribution: pjcdawkins commentedRemoved misleading statement
Comment #4
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedi am on jquery ui 1.7 and jquery 1.10 and get the same error.
Comment #5
DamienMcKennaClarifying that this is related to the new popup dialog interface that was added to Token recently which is still not supported by many modules.
Out of interest, what module were you opening up the dialog for? Do you know what type of object it was loading tokens for, e.g. a node, a term, a user, global?
Comment #6
Dave ReidUntil we can narrow this down to what is causing it, moving to a support request.
Comment #7
jhoffmcd CreditAttribution: jhoffmcd commentedAny news on this? I just got this error trying to use tokens with File (Field) Paths.
Comment #8
kevinquillen CreditAttribution: kevinquillen commentedThis is still happening.. I added the patch that adds current page entity context object as tokens. Now, the token dialog browser just breaks with that js error. The older method, where it isn't a dialog and is just a collapsed field element under "Replacement patterns", works.
Comment #9
ram4nd CreditAttribution: ram4nd commentedAny news on this? I just got this error trying to use tokens with File (Field) Paths. And adminimal theme, latest jquery.
Comment #10
Liam MorlandWe were using jQuery from the Google CDN and had this problem. We turned off the CDN and the problem was gone.
Comment #11
Dmitriy.trt CreditAttribution: Dmitriy.trt commentedExperienced the same issue. It's because of the way token dialog delivers HTML, CSS & JS for the dialog. Drupal provides proper way for it, so we don't have to print CSS/JS inside the document body, hack the theme, etc. Patch attached.
Comment #12
sylus CreditAttribution: sylus commentedThe latest attached patch fixed a lot of problems I was having with Tokens and the jQuery ui dialog. Additionally I really like how it leverages drupal native ajax handling.
Comment #13
philsward CreditAttribution: philsward commented#10 worked for me. Using jquery_update where backend is set to Drupal default and frontend set to 1.9.
Looks like the issue comes down to the CDN. I was using Google and didn't test against the others.
Comment #14
joseph.olstad+1 for patch 11
Comment #15
jennypanighetti CreditAttribution: jennypanighetti commentedPatch 11 got rid of my "treeTable is not a function" error and successfully loaded the tokens in a collapsible tree structure as desired.
Comment #16
nmillin CreditAttribution: nmillin at Madison Area Technical College commented+1 for patch 11
Comment #17
lamp5I can confirm that patch 11 also fixed my error. It will be nice to commit it :)
Comment #18
magoomby2 CreditAttribution: magoomby2 commentedI can confirm that patch 11 ALSO fixed my error running Drupal 7.59 and Token 7.x-1.7 .
Agreed, it will be nice to commit it