Not a bug jQuery context not available

AspectUnk

Member
Affected version
2.3.0
After updating to 2.3.0, any third-party scripts using jQuery do not work. Looks like a context scope issue.

You can reproduce it by inserting a similar code into any template:
Code:
<xf:js>
    console.log("executed");
    console.log(typeof jQuery);
    console.log(typeof $);
    
    function uniq_fn()
    {
        console.log("function");
    }
</xf:js>

1720307830452.webp
 
jQuery is no longer globally loaded in XF 2.3

 
jQuery is no longer globally loaded in XF 2.3

Alright, but why is the function unavailable after definition
 
Inline JS is wrapped in an event handler so the function definition is scoped. You can assign it to the global scope if you need to.
 
Back
Top Bottom