I have an Exception error when i enable Token module on drupal installation.

It working on localhost but not on my webserver. Files are the same.

Exception :
Drupal\Component\Plugin\Exception\PluginException: Plugin (token_tree_table) instance class "Drupal\token\Element\TokenTreeTable" does not exist. in Drupal\Component\Plugin\Factory\Default

#ls modules/token/src/Element/TokenTreeTable.php
modules/token/src/Element/TokenTreeTable.php

#head -15 modules/token/src/Element/TokenTreeTable.php

<?php

namespace Drupal\token\Element;

use Drupal\Component\Utility\Html;
use Drupal\Core\Render\Element\Table;

/**
 * Provides a render element for a token tree table.
 *
 * @RenderElement("token_tree_table")
 */
class TokenTreeTable extends Table {

I tried to uninstall / re-install but i got same error.

How can i help you to debugging this? I am on Fedora (localhost) and Debian (production)

Comments

Maraumax created an issue. See original summary.

Berdir’s picture

Status: Active » Postponed (maintainer needs more info)

I have no idea why that wouldn't work, this is a standard plugin implementation, there is nothing speical about it. What PHP versions do you have locally/server, did you try to restart apache?

skuark’s picture

I was experiencing the same issue. I solved it restarting php-fpm service. Maybe opcache was caching an old version.

oana.hulpoi’s picture

I was experiencing the same issue. Running update.php solved my problem.