Visitar URL original
Fixes issue #1524: isolate partial update script evaluation by arimu1 · Pull Request #1598 · apache/wicket · GitHub
Skip to content

Fixes issue #1524: isolate partial update script evaluation - #1598

Open
arimu1 wants to merge 1 commit into
apache:masterfrom
arimu1:fix/1524-partial-update-script-fail
Open

arimu1 wants to merge 1 commit into
apache:masterfrom
arimu1:fix/1524-partial-update-script-fail

Conversation

@arimu1

@arimu1 arimu1 commented Sep 12, 2026 •

Copy link
Copy Markdown

Summary

When several scripts are contributed to an Ajax partial page update, Wicket previously combined them into a single <evaluate> (or <priority-evaluate>) block. If one script throws at runtime, the browser stops executing the rest of that block, so later scripts and DOM updates never run.

This change emits one evaluation block per contributed script, matching the client-side behavior in wicket-ajax-jquery.js where each inline script is evaluated inside its own try/catch.

Fixes #1524

Test plan

  • mvn -pl wicket-core-tests -am test -Dtest=XmlPartialPageUpdateTest -Dsurefire.failIfNoSpecifiedTests=false
  • New test failingScriptDoesNotPreventSubsequentScripts asserts two separate <evaluate> elements when two scripts are appended (repro from https://github.com/reiern70/ajaxevaluationfails)

@arimu1
arimu1 force-pushed the fix/1524-partial-update-script-fail branch 2 times, most recently from 22a519c to af59912 Compare September 12, 2026 23:17
Emit each contributed script in its own evaluate/priority-evaluate block so
a runtime failure in one script does not prevent the client from running the rest.
@arimu1
arimu1 force-pushed the fix/1524-partial-update-script-fail branch from af59912 to dc5869f Compare September 12, 2026 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

partial page update fails if one of the contributed scripts fail

1 participant