Start with a new drupal 8 install only install token, ds & layout Plugin, enable token, display suite & layout Plugin. Go to articles content type and change the manage display to ds layout and i get "Theme hook token_tree not found." error in my log everything i access content type manage display with ds layout.

Running drupal 8.0.5, nginx 1.8.1 and php 7 php-fpm

CommentFileSizeAuthor
#7 2691173-7.patch1.4 KBswentel

Comments

spacereactor created an issue. See original summary.

swentel’s picture

Not sure if that is our problem since we wrap it in a module exists check and token_tree theme function seems to be defined (at least in my version of token, should maybe update)

spacereactor’s picture

I just test with https://simplytest.me/ drupal 8.1.0 rc with token, Display Suite, Layout plugin and Admin Toolbar. After install, go to extend and on the following modules. Admin Toolbar, Admin Toolbar Extra Tools, Display Suite, Layout Plugin, Token.

Flush all caches and run cron, go to structure -> content types -> article -> manage display.

Change layout for article in default to any ds layout. Check recent log messages, and refresh articles manage display. you have another Theme hook token_tree not found. in your log.

simplytest.me using php 5.5 and apache so i don't think got anything to do with server settings

spacereactor’s picture

i also try ds 8.x-2.3 same problem. Maybe need to change token_tree to token_tree_link

https://www.drupal.org/node/2640138

spacereactor’s picture

At ds/src/Plugin/DsLayout.php

$form['region_wrapper']['tokens']['help'] = array(
        '#theme' => 'token_tree',
        '#token_types' => 'all',
        '#global_types' => FALSE,
        '#dialog' => TRUE,

to

$form['region_wrapper']['tokens']['help'] = array(
        '#theme' => 'token_tree_link',
        '#token_types' => 'all',
        '#global_types' => FALSE,

To remove the "Theme hook token_tree not found." error each time ds manage display is use.

I also find ds/src/Form/TokenFieldForm.php using token_tree.

4aficiona2’s picture

After enabling a Display Suite layout (default, One column layout) on a node bundle (content type) I can also see the warning message in the Watchdog Theme hook token_tree not found..

What I also observed is when I enable a Display Suite layout that HOOK_preprocess_node() is not anymore triggered for this node. Might those issues be related? I filed an issue on Drupal Exchange for that already a couple of days ago.

I use Drupal with version 8.0.6, DS 8.x-2.3, Layout Plugin 8.x-1.0-alpha22, Token 8.x-1.0-alpha2 and some more modules.

swentel’s picture

Status: Active » Needs review
StatusFileSize
new1.4 KB

So yeah, we need to change the link. Patch attached, will commit in a few.

  • swentel committed d5920bb on 8.x-2.x
    Issue #2691173 by swentel: Theme hook token_tree not found
    
swentel’s picture

Status: Needs review » Fixed

comitted and pushed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.