Error 500 on Joomla 2.5.8 : JHtml: :jquery not supported. File not found

喜欢而已 提交于 2019-12-02 02:03:26

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');
}

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!