1

我正在使用 Joomla 2.5.8 。实际上,在我安装新主题后,此错误发生“JHtml: :jquery not supported. File not found”。由于我是 Joomla 的新手,所以我无法弄清楚。我什至尝试了 Joomla Jquery 库插件,但没有帮助。请帮我整理一下。

这是调试信息:

1 JSite->render() JROOT/index.php:48
2 JDocumentHTML->parse()  JROOT/includes/application.php:259
3 JDocumentHTML->_fetchTemplate() JROOT/libraries/joomla/document/html/html.php:414
4 JDocumentHTML->_loadTemplate()  JROOT/libraries/joomla/document/html/html.php:591
5 require()   JROOT/libraries/joomla/document/html/html.php:531
6 TemplateWarpHelper->render()    JROOT/templates/yoo_revista/index.php:19
7 include()   JROOT/templates/yoo_revista/warp/helpers/template.php:49
8 TemplateWarpHelper->render()    JROOT/templates/yoo_revista/layouts/template.php:17
9 include()   JROOT/templates/yoo_revista/warp/helpers/template.php:49
10 JHtml::_() JROOT/templates/yoo_revista/warp/systems/joomla/layouts/head.php:22
11 JError::raiseError()   JROOT/libraries/joomla/html/html.php:123
12 JError::raise()    JROOT/libraries/joomla/error/error.php:251
4

2 回答 2

5

找到用于导入 jQuery 的代码行并确保它显示以下内容:

JHtml::_('jquery.framework');

它以 noConflict 模式导入它,但也仅适用于Joomla 3.x

否则,您可以将其替换为以下内容,这将检测是否已经加载了 jQuery 库,如果没有,它将导入它。

if (!JFactory::getApplication()->get('jquery'))
{
    JFactory::getApplication()->set('jquery',true);
    JFactory::getDocument()->addScript('http://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js');
}
于 2012-12-15T18:15:55.757 回答
0

JHtmlJquery is not a class in Joomla! 2.5, it was introduced in 3.0 with the other UI changes. Odds are the extension you've installed is designed for Joomla! 3.0 and later.

于 2013-05-14T20:00:40.513 回答