Joomla 2.5.8上的错误500:不支持JHtml::jquery.文件未找到 [英] Error 500 on Joomla 2.5.8 : JHtml: :jquery not supported. File not found
问题描述
我正在使用Joomla 2.5.8.实际上,在我安装新主题之后,发生此错误"JHtml :: jquery不支持.找不到文件".由于我是Joomla的新手,所以我无法弄清楚.我什至尝试了Joomla Jquery Library插件,但无济于事.请帮我解决一下.
I am using Joomla 2.5.8 . Actually after i install a new theme this error occurred "JHtml: :jquery not supported. File not found" . Since i am new on Joomla i was unable to figure out. I even tried out Joomla Jquery Library plugins but non helped. Please help me to sort it out.
这是调试信息:
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
推荐答案
找到用于导入jQuery的代码行,并确保其显示以下内容:
Locate the line that the code being used to import jQuery and make sure it shows the following:
JHtml::_('jquery.framework');
以noConflict模式导入它,但也仅用于 Joomla 3.x
Which imports it in noConflict mode, but is also for Joomla 3.x only
否则,您可以将其替换为以下内容,这将检测是否已加载jQuery库,如果未加载,则将其导入.
Else you can replace it with the following, which will detect if a jQuery library is already being loaded and if not, it will import it.
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');
}
这篇关于Joomla 2.5.8上的错误500:不支持JHtml::jquery.文件未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!