?
Referenced as Pull Request for: # 7016
avatar frogydiak
frogydiak
17 Oct 2014

Steps to reproduce the issue

Installed Joomla v3.3.6 in localhost using XAMPP 1.8.2-5 and without any other component installed you can see an inline javascript file loaded in the head that is calling jQuery tooltip and popover. And that was causing the Error in Firebug Console.

I installed SmartSlider 2 component from http://www.nextendweb.com. I was wondering why their module disappears when I add a new module in any position. When I look at firebug console, I am getting "TypeError: JQuery(...).tooltip is not a function". That error stopped javascript to make nextendweb.com slider module to work.

Expected result

jQuery tooltip and popover shouldn't be loaded or called when there is no use for it.

Actual result

screen shot 2014-10-16 at 22 41 30

System information (as much as possible)

Additional comments

Fix is from nextendweb.com support (Gabor Racz):

This error is probably coming from this file: libraries/cms/html/bootstrap.php

Look for this code, it's probably at line 481.:
$script[] = "\t jQuery('" . $selector . "').tooltip(" . $options . ");";

change it to this:
$script[] = "\t if ( jQuery.isFunction(jQuery.fn.tooltip) ) jQuery('" . $selector . "').tooltip(" . $options . ");";

After changing line 481, I then got an error on popover, then around line 380.:
jQuery('" . $selector . "').popover(" . $options . ");

Change like 380 to:
if ( jQuery.isFunction(jQuery.fn.popover) ) jQuery('" . $selector . "').popover(" . $options . ");

The hack nextendweb.com provided worked, their slider module worked fine and I'm not seeing the javascript error anymore.

Votes

# of Users Experiencing Issue
1/5
Average Importance Score
2.80

avatar frogydiak frogydiak - open - 17 Oct 2014
avatar nicksavov
nicksavov - comment - 17 Oct 2014

Thanks @frogydiak! Could you submit a pull request with the proposed fix? Here's a very easy way:
http://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests

avatar nicksavov nicksavov - change - 17 Oct 2014
Labels Added: ?
avatar FriendlyHacker
FriendlyHacker - comment - 18 Oct 2014

On the template file, if you have something like this it will fail:

<script>
$('.hasTooltip').tooltip()
</script>

The proper way to do it is this:

<script>
jQuery( document ).ready(function( $ ) {
   $('.hasTooltip').tooltip();
});
</script>



This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4719.

avatar frogydiak
frogydiak - comment - 18 Oct 2014

Hi FriendlyHacker,

What is the proper way? Your related issue URL goes to 404! Can you fix it please. Thanks!

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4719.

avatar frogydiak
frogydiak - comment - 18 Oct 2014

Hi Nick, Done! Thanks!

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4719.

avatar coolbung
coolbung - comment - 18 Oct 2014

Don't see any tooltip error on the stock Joomla with sample data installed. Doesn't seem to be a Joomla issue. It's related to a 3PD plugin which is not ensuring the tooltip JS library is loaded before using the tooltip code.

avatar haydenyoung
haydenyoung - comment - 18 Oct 2014

Installed latest staging from github. Unable to reproduce either. Not seeing any jquery errors on home page or registration. Is there any more information on this issue?

From experience I would guess that the 3PD plugin is loading its own jquery, breaking joomla's.

avatar jissues-bot jissues-bot - close - 18 Oct 2014
avatar jissues-bot jissues-bot - close - 18 Oct 2014
avatar vdespa vdespa - change - 18 Oct 2014
Status New Closed - Unconfirmed Report
avatar jissues-bot
jissues-bot - comment - 18 Oct 2014

Set to "closed" on behalf of @vdespa by The JTracker Application at issues.joomla.org/joomla-cms/4719

avatar jissues-bot jissues-bot - change - 18 Oct 2014
Closed_Date 0000-00-00 00:00:00 2014-10-18 16:24:07
avatar IberoMedia
IberoMedia - comment - 21 Mar 2015

Still a problem with Joomla 3.4.0

After a clean install w/o sample data, console reports:

hastooltip_undefined_function

hastooltip_error

avatar IberoMedia IberoMedia - reference | - 21 Mar 15
avatar joomla-cms-bot joomla-cms-bot - reopen - 31 Mar 2015
avatar vdespa vdespa - change - 31 Mar 2015
Status Closed - Unconfirmed Report New
Closed_Date 2014-10-18 16:24:07
avatar joomla-cms-bot
joomla-cms-bot - comment - 31 Mar 2015

Set to "open" on behalf of @vdespa by The JTracker Application at issues.joomla.org/joomla-cms/4719

avatar joomla-cms-bot joomla-cms-bot - change - 31 Mar 2015
Status Closed - Unconfirmed Report New
avatar joomla-cms-bot joomla-cms-bot - reopen - 31 Mar 2015
avatar brianteeman brianteeman - change - 1 Apr 2015
Labels Added: ?
avatar flashfs
flashfs - comment - 6 Apr 2015

I was having this same problem upgrading from 2.5.8 to 3.4.1. After some research, listed all my JavaScript libraries with Web Developer Firefox's extension, and found that I was loading another jQuery library from Hot Image Slider module that was in conflict with the one from Joomla.

avatar Fedik
Fedik - comment - 6 Apr 2015

would be good to know on which page exactly it happens, at least ...

avatar shadow-kun
shadow-kun - comment - 23 May 2015

Confirmed, previous fix still works... now to do that pull request.

avatar shadow-kun shadow-kun - reference | 859a187 - 23 May 15
avatar zero-24 zero-24 - close - 23 May 2015
avatar zero-24
zero-24 - comment - 23 May 2015

´Closing as we have a pull request by @shadow-kun here: #7016 Thanks

avatar zero-24 zero-24 - change - 23 May 2015
Status New Closed
Closed_Date 2014-10-18 16:24:07 2015-05-23 20:47:47
Closed_By zero-24
Build 3.3.6 [Ember] staging
avatar zero-24 zero-24 - close - 23 May 2015
avatar adamasantares
adamasantares - comment - 18 Nov 2015

It happen when you use Pagination class.
jimport('joomla.html.pagination');

I sure that this problem of bootstrap scripts. May be "tooltip.js" is not exists inside bootstrap?

Add a Comment

Login with GitHub to post a comment