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 not supported. File not found".因为我是 Joomla 的新手,所以我无法弄清楚.我什至尝试了 Joomla Jquery 库插件,但没有帮助.请帮我整理一下.
这是调试信息:
<块引用>1 JSite->render() JROOT/index.php:482 JDocumentHTML->parse() JROOT/includes/application.php:2593 JDocumentHTML->_fetchTemplate() JROOT/libraries/joomla/document/html/html.php:4144 JDocumentHTML->_loadTemplate() JROOT/libraries/joomla/document/html/html.php:5915 require() JROOT/libraries/joomla/document/html/html.php:5316 TemplateWarpHelper->render() JROOT/templates/yoo_revista/index.php:197 include() JROOT/templates/yoo_revista/warp/helpers/template.php:498 TemplateWarpHelper->render() JROOT/templates/yoo_revista/layouts/template.php:179 include() JROOT/templates/yoo_revista/warp/helpers/template.php:4910 JHtml::_() JROOT/templates/yoo_revista/warp/systems/joomla/layouts/head.php:2211 JError::raiseError() JROOT/libraries/joomla/html/html.php:12312 JError::raise() JROOT/libraries/joomla/error/error.php:251
找到用于导入 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');}
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.
This is the Debug info:
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
Locate the line that the code being used to import jQuery and make sure it shows the following:
JHtml::_('jquery.framework');
Which imports it in noConflict mode, but is also for Joomla 3.x only
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屋!