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

前端 未结 2 1446
-上瘾入骨i
-上瘾入骨i 2021-01-21 22:51

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 fi

相关标签:
2条回答
  • 2021-01-21 23:22

    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.

    0 讨论(0)
  • 2021-01-21 23:23

    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');
    }
    
    0 讨论(0)
提交回复
热议问题