News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

Joomla 3.4.4: Fix for broken tooltips - [Solved - but not really a bug in jD]

Started by schmatzler, 16.09.2015 15:16:24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

schmatzler

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

ColinM

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
Colin M
  •  

schmatzler

Just adding

JHTML::_('bootstrap.tooltip');

should do all that automatically. ;)
  •  

Arno

JHtml::_('behavior.tooltip');
(mootools) is not longer supported?

So we need
JHTML::_('bootstrap.tooltip');additional or instead?
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

schmatzler

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

Arno

#5
Thanks. I will check it.
In the Joomla core seems to be used both.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

schmatzler

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
  •  

Arno

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.  :(
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

schmatzler

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

Arno

Danke. Ich hab es jetzt entsprechend abgeändert.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

schmatzler

  •