[WICKET-7179] add support for jQuery 4.0.0#1412
Conversation
|
I can't believe that there is no need of any migrations in wicket-jquery-ajax.js ! @reiern70 You may want to add jquery-migrate-4.0.2.js next to jquery.js and see whether it reports something. |
| return INSTANCE_3; | ||
| } | ||
|
|
||
| public static JQueryResourceReference getV4() |
There was a problem hiding this comment.
I should have checked the diff before my comment!
The V4 is not in use yet! This is the reason why the tests pass.
There was a problem hiding this comment.
See
https://blog.jqueryui.com/2026/01/jquery-ui-1-14-2-released/
The new release seems to be compatible with 4.0
There was a problem hiding this comment.
This link is relevant to wicket-jquery-ui and wiquery but it does not affect wicket-core anyhow.
There was a problem hiding this comment.
I know. This is just a heads up tha we need to update the related wicket-stuff projects too. It seems this new release is also compatible with jQuery 4
|
I will enable it and see what fails |
4c50e0c to
c06b954
Compare
|
@martin-g test are green locally |
|
@reiern70 You need to use |
Thanks for the info |
I can't run them locally... |
|
What is the error ? You can also start them via Jetty with https://github.com/apache/wicket/blob/master/testing/wicket-js-tests/src/test/java/org/apache/wicket/testing/jstest/StartJavaScriptTests.java#L41 Then you can execute them in a browser with http://localhost:8080/ajax-tests/test/js/all.html?4.0.0 |
Not able to run test in sandbox mode. |
@martin-g I have fixed JavaScript tests |
c4d7dc8 to
1a2aac8
Compare
https://github.com/apache/wicket/actions/runs/24576240090/job/71862191241#step:8:4355 no idea how to fix this. @martin-g ? |
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
…andbox Otherwise it looks for CI env var to set --no-sandbox Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
|
@reiern70 See my commits. Now the error is more clear - wicket/wicket-core/src/test/js/ajax.js Line 206 in ddf0f6d |
|
All tests passed locally and pur application seems to work fine with a copy
of jquery AJAX.... js file.
Regards -
Ernesto Reinaldo Barreiro
Apache Wicket Committer
…On Fri, Apr 17, 2026, 10:35 PM Martin Grigorov ***@***.***> wrote:
*martin-g* left a comment (apache/wicket#1412)
<#1412?email_source=notifications&email_token=AADQ6PZ4EZ5CS3T4WLJMH6D4WLZXTA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMRXGI2TOMZSGA22M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJNLQOJPWG33NNVSW45C7N5YGK3S7MNWGSY3L#issuecomment-4272573205>
@reiern70 <https://github.com/reiern70> See my commits. Now the error is
more clear - [INFO] .Test "non-wicket response." took longer than 3000ms.
You need to debug
https://github.com/apache/wicket/blob/ddf0f6da30b237296188bda7bd570b4612356aa4/wicket-core/src/test/js/ajax.js#L206
and see why it does not work.
—
Reply to this email directly, view it on GitHub
<#1412?email_source=notifications&email_token=AADQ6PZ4EZ5CS3T4WLJMH6D4WLZXTA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMRXGI2TOMZSGA22M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJNLQOJPWG33NNVSW45C7N5YGK3S7MNWGSY3L#issuecomment-4272573205>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADQ6P5DG5MOX2NBOB2FE234WLZXTAVCNFSM6AAAAACXIHYNU2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DENZSGU3TGMRQGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Here the JS tests fail the same way as at CI |
|
75 out of 109 have passed for you and then non-wicket response hangs. Same issue as at CI. |
|
@martin-g I have fixed JS tests. But I can't still do a full build
|
|
00ee8b9 should tell Puppeteer to start Chrome without sandbox. |
With this build blocks at some point |
|
The same as in here https://github.com/apache/wicket/actions/runs/24739332723/job/72374517805?pr=1412 |
|
@martin-g I might need your help fixing amd.js test when run from maven. Test pass if run from normal browser |
|
we can drop amd.js. No one cares about AMD these days |
Done. Build passes locally. |
There was a problem hiding this comment.
We can update it to 2.7.0 from https://github.com/jakerella/jquery-mockjax/blob/master/dist/jquery.mockjax.js
|
|
||
| queryString = jQuery.param(queryString, true); | ||
| var space = jQuery.fn.jquery.indexOf("3") === 0 ? "%20" : "+"; | ||
| var space = jQuery.fn.jquery.indexOf("4") === 0 ? "%20" : "+"; |
There was a problem hiding this comment.
This should be: if version.startsWith('2') ? "+" : "%20"
There was a problem hiding this comment.
If I put 2 tests fail
There was a problem hiding this comment.
The idea is that the JS tests could be reused to test with any version of jQuery.
http://localhost:8080/ajax-tests/test/js/all.html?4.0.0 will test with jQuery 4.0.0
http://localhost:8080/ajax-tests/test/js/all.html?3.7.1 will test with jQuery 3.7.1
AFAIR var space = jQuery.fn.jquery.indexOf("4") === 0 ? "%20" : "+"; is checking which major version of jQuery is in use. Both 4.x and 3.x should use %20 as a space in urls.
|
|
||
| queryString = jQuery.param(queryString, true); | ||
| var space = jQuery.fn.jquery.indexOf("3") === 0 ? "%20" : "+"; | ||
| var space = jQuery.fn.jquery.indexOf("4") === 0 ? "%20" : "+"; |
…rateResourceReference.java Co-authored-by: Martin Grigorov <martin-g@users.noreply.github.com>
…-ajax-jquery.js Co-authored-by: Martin Grigorov <martin-g@users.noreply.github.com>
…f jquery.mockjax.js
| /** | ||
| * The jQuery migrate library | ||
| */ | ||
| public class JQueryMigrateResourceReference extends JavaScriptResourceReference |
There was a problem hiding this comment.
I am not sure whether this class should stay.
jquery-migrate.js is a helper that should be used while migrating jQuery dependant code from 3.x to 4.x. But once the migration is done it is not needed anymore.
It does not do any harm though.
There was a problem hiding this comment.
I am not sure whether this class should stay. jquery-migrate.js is a helper that should be used while migrating jQuery dependant code from 3.x to 4.x. But once the migration is done it is not needed anymore.
It does not do any harm though.
It is needed by applications wanting to migrate. I.e. I have used it to migrate our app to jQuery 4,0 and updated wicket jQuery AJAX file
| jQuery(document).ready(function() { | ||
| "use strict"; | ||
|
|
||
| var isWindow = function (obj) { return obj != null && obj === obj.window; }; |
There was a problem hiding this comment.
| var isWindow = function (obj) { return obj != null && obj === obj.window; }; |
…f jquery.mockjax.js
|
Again green build locally. I have addressed your comments |


No description provided.