- Posts: 19
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- [SOLVED] Dropdown bootstrap works incorrectly on cat. page
[SOLVED] Dropdown bootstrap works incorrectly on cat. page
- Jan Zoutendijk
-
Topic Author
- Offline
- New Member
Hope you can help,
Jan
EDIT: It happened after upgrading Joomla from 3.1 to 3.1.5!
Please Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
Now the dropdowns are working ok.
Please Log in or Create an account to join the conversation.
- Jan Zoutendijk
-
Topic Author
- Offline
- New Member
- Posts: 19
I copied the libraries folder from joomla 3.1.0 and replaced the libraries folder from the 3.1.5 installation (on a test environment). After this the dropdown worked again, though my backend was all messed up. So maybe it has to do with something in the libraries folder?
EDIT: Btw, if I remove all instances of $this->pagination->getPagesLinks() from the category file the dropdown will work too.
Please Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
From what I saw bootstrap.min.js library is loading twice in your page. Maybe this is the cause of your conflicts.
Try Disabling one of them it and check if anything changes.
Please Log in or Create an account to join the conversation.
- Jan Zoutendijk
-
Topic Author
- Offline
- New Member
- Posts: 19
Thanks!
Please Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
There is no option to Disable the default one from Joomla! I'm afraid. You will have to unset it through code in your template.
Please Log in or Create an account to join the conversation.
- Jan Zoutendijk
-
Topic Author
- Offline
- New Member
- Posts: 19
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
$document = JFactory::getDocument(); (make sure this is not already defined somewhere else)
unset($document->_scripts[$this->baseurl . '/media/jui/js/bootstrap.min.js']);
This will actually disable the default joomla bootstrap.min.js
PS. Not sure it will work but you could give it a try.
Please Log in or Create an account to join the conversation.
- Jan Zoutendijk
-
Topic Author
- Offline
- New Member
- Posts: 19
Do you think this is a bug, because many people will use bootstrap for their front end template. I'll add this code to my default template anyway.
EDIT: the problem occurs on pages that use the tooltip, also the search results page for instance.
Please Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
But either way I think that there should be an option for disabling it somewhere in the Joomla! configuration maybe.
As you said there are many that use it with additional features and the default one doesn't suffice.
Please Log in or Create an account to join the conversation.
- Jan Zoutendijk
-
Topic Author
- Offline
- New Member
- Posts: 19
Please Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
You cannot avoid loading it through index.php either way.
This issue rose after version 3.1.5 where the library is loading when necessary.
If someone needs it for his/her frontend he could include the JHtml::_('bootstrap.framework') in order to use the already existing library instead of reloading it through another place.
You could read more about the use of that here:
docs.joomla.org/J3.1:Javascript_Frameworks
Please Log in or Create an account to join the conversation.
- Jan Zoutendijk
-
Topic Author
- Offline
- New Member
- Posts: 19
Please Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- [SOLVED] Dropdown bootstrap works incorrectly on cat. page