I was scratching my head on this one for a while, maybe it helps others.
When I made the update from Joomla 3.4.3 to 3.4.4 the tooltips for the download description in the modules didn't show up anymore.
What happened?
By comparing the source of the website I found out, that bootstrap.min.js was missing - also, this snippet of code wasn't inserted anymore:
jQuery('.hasTooltip').tooltip({"html": true,"container": "body"});
The tooltips worked fine when other components inserted the js by themselves (that's why it worked as a super-user since I had frontend menu editing activated).
How to fix?
The fix for this is pretty simple. In the template's index.php I added
JHTML::_('bootstrap.tooltip');
just before the <!DOCTYPE html> section.
However, this is a little bit crude, since it now loads the tooltip javascript on every page.
It's fine for me, but a better fix would be to insert this code into the various modules so it only loads when it's needed.
Hi
Thanks
That is really helpful
Just to be clear we now need to insert bootstrap.min.js in each module and also include
jQuery('.hasTooltip').tooltip({"html": true,"container": "body"});
Colin
Just adding
JHTML::_('bootstrap.tooltip');
should do all that automatically. ;)
JHtml::_('behavior.tooltip');
(mootools) is not longer supported?
So we need
JHTML::_('bootstrap.tooltip');
additional or instead?
Mootools is still included, but will be deprecated soon, according to the wiki.
I never used Mootools. Apparently it can be included with
JHtml::_('behavior.framework');
but that doesn't do anything by itself, it just loads the mootools.js. No tooltips.
With
JHTML::_('bootstrap.tooltip');
the javascript files for bootstrap get included and also the section for enabling tooltips is put into the code:
jQuery('.hasTooltip').tooltip({"html": true,"container": "body"});
For me it looks like this is the way it should be. I'm not a coder, though.
Thanks. I will check it.
In the Joomla core seems to be used both.
The default themes include Mootools, JQuery and Bootstrap, yes.
But not every theme does it, like mine. ;) I also don't like the idea of just adding "everything" to the mix for a tooltip :P
Hm.. versuchs mal lieber mit deutsch. ;)
Wir brauchen ja eine Lösung die mit allen templates arbeitet. Und bis zu deinem Update auf 3.4.4 war das ja wohl auch kein Problem (bei dir).
Für uns Entwickler ist es nicht immer ganz einfach, wenn Joomla mal wieder hunderte Dinge nach einem Update geändert hat und wir uns wundern, wieso das eine oder andere plötzlich nicht mehr läuft. Das hat schon viele Entwickler vergrault, die Joomla den Rücken gekehrt haben.
Ich werde mich also mal wieder auf die Suche machen müssen, welche Vorgehensweise denn in diesem Punkt empfohlen wird. :(
Das Theme was ich benutze, stammt noch aus der Joomla 2.5-Zeit.
Standardmaessig wurde da weder Bootstrap noch Mootools geladen - es wird nur das eingefuegt, was Joomla von sich aus laedt.
Die beiden Themes von Joomla 3.4 laden sowohl Mootools als auch die bootstrap.min.js. Find' ich bisschen komisch, aber wahrscheinlich machen sie das um rueckwaertskompatibel zu einigen Erweiterungen zu bleiben.
Da Bootstrap mittlerweile bei sehr vielen Themes genutzt wird um responsive designs zu machen, duerften die allerwenigsten Nutzer Probleme haben, da sowieso immer das richtige Zeug geladen wird.
Im Grunde kann man es auch so lassen - der Nutzer muss dann fuer sein Theme selbst sicherstellen, dass bootstrap geladen wird. Mootools alleine funktioniert jedenfalls nicht, oder ich bin zu bloed das hinzubekommen.
Danke. Ich hab es jetzt entsprechend abgeändert.
Thanks. Now it works as it did before ;D