Hi,
had a sudden problem with tabs not opening on a new website with a form installed from backup which worked on its source proper and smoothly.
Firebug console showed JS Error:
Its source was an included JS script:
frogydiak presented a solution hack on github which worked fine for me:
If anybody meets the same problem, I hope this will provide some help.
Regards,
Herbert
had a sudden problem with tabs not opening on a new website with a form installed from backup which worked on its source proper and smoothly.
Firebug console showed JS Error:
TypeError: jQuery(…).tooltp is not a function
Its source was an included JS script:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('.hasTooltip').tooltip({"html": true,"container": "body"});
});
</script>
frogydiak presented a solution hack on github which worked fine for me:
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 line 380 to:
if ( jQuery.isFunction(jQuery.fn.popover) ) jQuery('" . $selector . "').popover(" . $options . ");
If anybody meets the same problem, I hope this will provide some help.
Regards,
Herbert
Hi Herbert,
Have you checked that jQuery UI is being loaded on the new site? That would also explain the error.
Bob
Have you checked that jQuery UI is being loaded on the new site? That would also explain the error.
Bob
Hi Bob,
what do you mean?
Is it necessary to have UI loaded to avoid the error or is a loaded UI its reason?
Herbert
what do you mean?
Is it necessary to have UI loaded to avoid the error or is a loaded UI its reason?
Herbert
Hi Herbert,
I think that the ToolTip is a part of jQuery UI and so it fails if jQuery UI isn't loaded.
Bob
I think that the ToolTip is a part of jQuery UI and so it fails if jQuery UI isn't loaded.
Bob
Hi Herbert,
I use the jQueryEasy extension which works well to manage duplicate library loads.
Or you can use this in a Custom Code action in the On Load event
Bob
I use the jQueryEasy extension which works well to manage duplicate library loads.
Or you can use this in a Custom Code action in the On Load event
<?php
JHtml::_('jquery.ui');
?>
Bob
Hi Bob,
I downloaded jqueryEasy plugin – but am far from understanding what to do with it and which settings I have to use.
Since today the error occured again, I tried your code in a custom code – it didn't help.
So I returned to my first mentioned hack here, which worked. :-(
Kind regards,
Herbert
I downloaded jqueryEasy plugin – but am far from understanding what to do with it and which settings I have to use.
Since today the error occured again, I tried your code in a custom code – it didn't help.
So I returned to my first mentioned hack here, which worked. :-(
Kind regards,
Herbert
This topic is locked and no more replies can be posted.