Drupal - Devel Themer没有显示

时间:2014-02-22 02:09:51

标签: javascript drupal drupal-7 drupal-modules drupal-theming

首先,它向我显示Class 'simple_html_dom' not found in ...,但我找到了解决方案。现在即使Theme Developer模块被激活,它也不显示要检查左下角的单选框,Drupal没有显示任何错误,但是...
检查浏览器控制台时发现此错误:

Uncaught TypeError: Cannot read property 'themer_info' of undefined

这发生在第43行的文件modules/devel_themer/devel_themer.js

有没有人让这个模块在Drupal 7中运行?

2 个答案:

答案 0 :(得分:3)

有同样的问题并修复了它。 来自devel_themer drupal页面(https://drupal.org/project/devel_themer):

  

注意:   目前,Theme Developer无法使用最新版本的   simplehtmldom API。如果你想要Theme Developer>你必须使用simplehtml API版本7.x-1.12。正常运作。

按照它的建议并且它有效,令人烦恼的是,弄清楚它是一件很痛苦的事。

答案 1 :(得分:0)

看起来这个问题与Drupal的JavaScript包装器有关。作为一种快速解决方案,您可以在includes / common.inc文件中注释掉以下字符串:

$embed_prefix = "\n<!--//--><![CDATA[//><!--\n";
$embed_suffix = "\n//--><!]]>\n";

所以,它应该是这样的:

//    $embed_prefix = "\n<!--//--><![CDATA[//><!--\n";
//    $embed_suffix = "\n//--><!]]>\n";

完成后不要忘记恢复原始文件内容。希望有所帮助。