Keyword

[SOLVED] Dropdown bootstrap works incorrectly on cat. page

  • Jan Zoutendijk
  • Jan Zoutendijk's Avatar Topic Author
  • Offline
  • New Member
More
11 years 2 weeks ago - 11 years 2 weeks ago #118461 by Jan Zoutendijk
When using the dropdown functionality from Twitter Bootstrap on your webpage and when you're on a category page (K2) the dropdown menu-item only opens after clicking on it and then hovering over it. When I remove the the <!-- Pagination --> section from category.php (template), it will work properly again. Please visit rpmedical.nl/nieuws.html?limitstart=0 and try to click on "Producten" or "Over ons". It will behave incorrectly.

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
  • Yiota's Avatar
  • Visitor
11 years 2 weeks ago #118462 by Yiota
Could you enable the pagination so I can check the problem with your menus?
Now the dropdowns are working ok.

Please Log in or Create an account to join the conversation.

  • Jan Zoutendijk
  • Jan Zoutendijk's Avatar Topic Author
  • Offline
  • New Member
More
11 years 2 weeks ago - 11 years 2 weeks ago #118463 by Jan Zoutendijk
Replied by Jan Zoutendijk on topic Re: Dropdown bootstrap works incorrectly on cat. page
Thanks for your response. It's strange that the dropdown works at your computer. Did you test it while on the page "Nieuws"? You have to click it and then hover over it to make it work. It's not a big problem but just not how it's supposed to work. If you go to another page and click on the dropdown you'll see how it's supposed to work. It doens't matter if the pagination is showing or not, it won't work on pages with K2pagination, how strange as that may sound. If I delete the code (in my template folder for instance) the dropdown will work again.

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
  • Yiota's Avatar
  • Visitor
11 years 2 weeks ago #118464 by Yiota
SInce Joomla! version 3.1.5 some additions have been made to the pagination code and runs bootstrap in order to bring a tooltip on hover of next, previous, etc.
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
  • Jan Zoutendijk's Avatar Topic Author
  • Offline
  • New Member
More
11 years 2 weeks ago #118465 by Jan Zoutendijk
Replied by Jan Zoutendijk on topic Re: Dropdown bootstrap works incorrectly on cat. page
Yes, if I don't load bootstrap in my template this specific page (Nieuws) works correctly. But all the other pages don't work correctly anymore. Is it possible to not load bootstrap.min.js on pages with pagination? To tell Joomla not to load bootstrap anywhere, since I'm already adding it to my templatecode?

Thanks!

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 2 weeks ago #118466 by Yiota
I think it would be proper to Disable the one you have in your template code and keep the default from Joomla!.
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
  • Jan Zoutendijk's Avatar Topic Author
  • Offline
  • New Member
More
11 years 2 weeks ago #118467 by Jan Zoutendijk
Replied by Jan Zoutendijk on topic Re: Dropdown bootstrap works incorrectly on cat. page
But then my other pages won't work correctly anymore, I've already tested that. Only on pages with pagination will bootstrap load, but my dropdown menu en login pop-up work with bootstrap.js also.

Please Log in or Create an account to join the conversation.

More
11 years 2 weeks ago - 11 years 2 weeks ago #118468 by Lefteris
Maybe you could try adding this in your head in index.php of your template.

$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.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Jan Zoutendijk
  • Jan Zoutendijk's Avatar Topic Author
  • Offline
  • New Member
More
11 years 2 weeks ago - 11 years 2 weeks ago #118469 by Jan Zoutendijk
Replied by Jan Zoutendijk on topic Re: Dropdown bootstrap works incorrectly on cat. page
Yes, this works, thank you!!

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
  • Yiota's Avatar
  • Visitor
11 years 2 weeks ago #118470 by Yiota
They shouldn't if they were already developing in Joomla! 3 though.
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.


Powered by Kunena Forum