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.
jQuery tooltip and popover shouldn't be loaded or called when there is no use for it.
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.
Labels |
Added:
?
|
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.
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.
Hi Nick, Done! Thanks!
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4719.
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.
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.
Status | New | ⇒ | Closed - Unconfirmed Report |
Set to "closed" on behalf of @vdespa by The JTracker Application at issues.joomla.org/joomla-cms/4719
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-10-18 16:24:07 |
Status | Closed - Unconfirmed Report | ⇒ | New |
Closed_Date | 2014-10-18 16:24:07 | ⇒ |
Set to "open" on behalf of @vdespa by The JTracker Application at issues.joomla.org/joomla-cms/4719
Status | Closed - Unconfirmed Report | ⇒ | New |
Labels |
Added:
?
|
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.
would be good to know on which page exactly it happens, at least ...
Confirmed, previous fix still works... now to do that pull request.
´Closing as we have a pull request by @shadow-kun here: #7016 Thanks
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 |
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?
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