Page 1 of 1

JQuery is not loaded while bootstrap is loaded

Posted: 02 May 2016, 05:29
by Gruz
I get an error at a PhocaPhoto page

Code: Select all

ReferenceError: jQuery is not defined
http://pyatka.in.uac/media/com_phocaphoto/bootstrap/js/bootstrap.min.js
Line 11
I belive it's logical to load jquery when loading bootstrap
I file

Code: Select all

components/com_phocaphoto/views/categories/view.html.php
In the code

Code: Select all

		JHTML::stylesheet('media/com_phocaphoto/css/style.css' );
		if ($this->t['load_bootstrap'] == 1) {
			JHTML::stylesheet('media/com_phocaphoto/bootstrap/css/bootstrap.min.css' );
			$document->addScript(JURI::root(true).'/media/com_phocaphoto/bootstrap/js/bootstrap.min.js');
		}
Add jquery load

Code: Select all

		JHTML::stylesheet('media/com_phocaphoto/css/style.css' );
		if ($this->t['load_bootstrap'] == 1) {
			JHtml::_('jquery.framework');
			JHTML::stylesheet('media/com_phocaphoto/bootstrap/css/bootstrap.min.css' );
			$document->addScript(JURI::root(true).'/media/com_phocaphoto/bootstrap/js/bootstrap.min.js');
		}
This fixes my problems

P.S. And the same change is needed for the category and item views.

Re: JQuery is not loaded while bootstrap is loaded

Posted: 03 May 2016, 01:10
by Jan
Hi, thank you very much for the info, I will fix it in next version.

Jan

Re: JQuery is not loaded while bootstrap is loaded

Posted: 03 Mar 2019, 23:09
by Jan
Hi, should be OK in version 3.0.2
https://www.phoca.cz/news/1017-phoca-ph ... 2-released

Jan