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

前端 未结 2 1445
-上瘾入骨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: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');
    }
    

提交回复
热议问题