Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #326333

    Hello

    I’m testing WP4 and Enfold 2.9.2 against an existing site running older versions of both. We’re getting a JavaScript error on displaying a tooltip (caption) in a photo gallery. The problem is in the display_tooltip function of AviaTooltip:

    text = element.data(this.options.data).trim(),

    Uncaught TypeError: undefined is not a function avia.js?ver=2:1419
    $.AviaTooltip.display_tooltip avia.js?ver=2:1419
    m.isFunction.e

    We’ve experienced this elsewhere – we have created a tooltip using your JS:

    new $.AviaTooltip({"class": 'avia-siteswitch-tooltip',data: 'avia-siteswitch-tooltip', event:'click', position:'bottom', scope: "body", attach:'element'});

    Which broke with the same error on upgrade. We had to change the structure of the markup declared in the data attribute data-avia-siteswitch-tooltip to make it work – but we couldn’t work out what had changed, we were kinda fixing in the dark.

    Can you help? Be great to know what to do in both cases and also let us know if this is a bug, or whether we can’t rely on your UI classes to change going forward.

    Thanks

    #326976

    Hi,

    Can you post the link to the site please?

    Regards,
    Josue

    #327833
    This reply has been marked as private.
    #327844

    Hello,

    Have you tried disabling all third-party plugins to see if it gets fixed?

    Regards,
    Josue

    #327869

    Hello,

    Yes. I’ve been through all the normal procedures.

    As I said, I’m pretty certain it’s due to a change in the API of the Avia tooltip component.

    Thanks

    #327872

    Hi!

    I don’t think its been changed in a long time. Looking through the avia.js history I don’t see any notes about the tooltip getting updated in the past 6 months.

    The undefined error sounds like a general js error. Typically its an issue with another plugin or an incomplete/broken javascript file.

    If you download the 3.0 update that *just* went live on ThemeForest it has a fix I added to change the js version of avia to 3 which will clear any previous cache on the avia.js file. Or if you want to do that manually, first re-upload the whole js folder and then in your functions.php file find the avia.js being enqued and change the 2 to a 3 in that function.
    wp_enqueue_script( 'avia-default', $template_url.'/js/avia.js', array('jquery'), 3, true );

    That 3 will be a 2 on your version but its a 3 in version 3.

    Best regards,
    Devin

    #328538

    Hi

    Yep, the latest version seems to have fixed it. All plug-ins reactivated and all working fine.

    Thanks :)

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘JavaScript Error After Upgrade – Avia Tooltip’ is closed to new replies.