You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by sundar saba <su...@gmail.com> on 2022/05/25 04:45:39 UTC

Reg : Multiple versions of jQuery's are loaded on same page causing conflict

Hi all,
           I am using wicket v9.10.0 in my project. wherever we use both
select2 choice components from wicket-stuff and Highcharts in the same
page, it loads multiple versions of jQuery specifically v2.2.4 and v3.6.0.
This  causes conflicts and leads to highchart not displayed. However, If we
remove select2 components from the page, the highchart is displayed
properly. Seems  there is a conflict between  both versions of jQuery. Is
there a way to unload  jQuery v2.2.4 from the project ?

Re: Reg : Multiple versions of jQuery's are loaded on same page causing conflict

Posted by Maxim Solodovnik <so...@gmail.com>.
Can you share quick-start project?

from mobile (sorry for typos ;)


On Tue, May 31, 2022, 17:03 sundar saba <su...@gmail.com> wrote:

> Hi all,
>
>  Based on your solution my actual problem is solved. May I  know from
> where another version of jQuery v2.2.4 is loaded? And I know that jQuery
> v3.6.0 is loaded from the "JavaScriptLibrarySettings" class by default.
>

Re: Reg : Multiple versions of jQuery's are loaded on same page causing conflict

Posted by sundar saba <su...@gmail.com>.
Hi Martin,

            Thanks, I will try as suggested.

Re: Reg : Multiple versions of jQuery's are loaded on same page causing conflict

Posted by Martin Grigorov <mg...@apache.org>.
On Tue, May 31, 2022 at 1:03 PM sundar saba <su...@gmail.com>
wrote:

> Hi all,
>
>  Based on your solution my actual problem is solved. May I  know from
> where another version of jQuery v2.2.4 is loaded? And I know that jQuery
> v3.6.0 is loaded from the "JavaScriptLibrarySettings" class by default.
>

I'd bet it comes from here:
https://github.com/adessoSE/wicked-charts/blob/master/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/JavaScriptResourceRegistry.java#L81
You can set v3 with
https://github.com/adessoSE/wicked-charts/blob/d0bec5cda557112adaad8ad528b893d84bc06415/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/JavaScriptResourceRegistry.java#L236



>
>
>

Re: Reg : Multiple versions of jQuery's are loaded on same page causing conflict

Posted by sundar saba <su...@gmail.com>.
Hi all,

 Based on your solution my actual problem is solved. May I  know from
where another version of jQuery v2.2.4 is loaded? And I know that jQuery
v3.6.0 is loaded from the "JavaScriptLibrarySettings" class by default.

Re: Reg : Multiple versions of jQuery's are loaded on same page causing conflict

Posted by sundar saba <su...@gmail.com>.
Hi Martin,

            Thanks, I will try as suggested.

>

Re: Reg : Multiple versions of jQuery's are loaded on same page causing conflict

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

You could use
1) IHeaderResponseDecorator to filter out the JavaScriptResourceReference
for 2.x completely - check
https://nightlies.apache.org/wicket/guide/9.x/single.html#_put_javascript_inside_page_body
2) resource replacement (to replace 2.x with 3.x on the fly) - check
http://wicketinaction.com/2012/07/wicket-6-resource-management/

But I'd recommend you to upgrade the component that uses 2.x to 3.x.
If you "unload" 2.x then there is a chance the JS code will not work with
jQuery 3.x.

On Wed, May 25, 2022 at 7:46 AM sundar saba <su...@gmail.com>
wrote:

> Hi all,
>            I am using wicket v9.10.0 in my project. wherever we use both
> select2 choice components from wicket-stuff and Highcharts in the same
> page, it loads multiple versions of jQuery specifically v2.2.4 and v3.6.0.
> This  causes conflicts and leads to highchart not displayed. However, If we
> remove select2 components from the page, the highchart is displayed
> properly. Seems  there is a conflict between  both versions of jQuery. Is
> there a way to unload  jQuery v2.2.4 from the project ?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org