There are 5 updates, 3 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-231f3550-997a-4322-b96f-77fbecbecb87 XWIKI-25157 Closed

Limit Prototype.js usage

 
View issue   ยท   Add comment
 

5 updates

 
cid:jira-generated-image-avatar-3d4de3da-8e80-4c27-bcfb-c73fb5db7f8f Changes by Marius Dumitru Florea on 08/Oct/26 13:51
 
Fix Version: 18.9.0-rc-1
Documentation in Release Notes: N/A
Documentation: N/A
Resolution: Fixed
Status: Open Closed
 
 

3 comments

 
cid:jira-generated-image-avatar-3d4de3da-8e80-4c27-bcfb-c73fb5db7f8f Marius Dumitru Florea on 08/Oct/26 13:47
 

Migrated so far: these files no longer use the Prototype.js API. Their public API is unchanged, and the classes can still be extended with Prototype.js' Class.create(). All paths are relative to xwiki-platform-web-war/src/main/webapp/resources/.

  • d1709713e53
    • uicomponents/widgets/notification.js (XWiki.widgets.Notification)
    • js/xwiki/widgets/modalPopup.js (XWiki.widgets.ModalPopup)
    • uicomponents/widgets/confirmationBox.js (XWiki.widgets.ConfirmationBox)
    • uicomponents/widgets/locationPicker.js, js/xwiki/editors/simpletoolbar.js, uicomponents/link/link-protection.js
  • 7b67aafdf41
    • uicomponents/widgets/fullScreen.js (XWiki.widgets.FullScreen). The XWiki.editors.FullScreenEditing alias, deprecated since 2.6RC2, was removed.
    • uicomponents/widgets/upload.js (xwiki-upload / XWiki.FileUploader)
    • js/xwiki/editors/autosave.js (XWiki.editors.AutoSave)
  • 89576e8092b
    • uicomponents/widgets/list/xlist.js (XWiki.widgets.XList / XListItem)
    • uicomponents/lock/lock.js (XWiki.DocumentLock)
    • js/xwiki/widgets/jumpToPage.js (XWiki.widgets.JumpToPage)
    • uicomponents/viewers/tags.js (XWiki.viewers.Tags)
    • uicomponents/widgets/buttonGroup.js (XWiki.widgets.ButtonGroup / DynamicButtonGroup)
    • uicomponents/widgets/gallery/gallery.js (XWiki.Gallery)
    • js/xwiki/viewers/attachments.js, js/xwiki/panelwizard/toolTip.js

Code that must see the xwiki:* events still fired by Prototype.js (such as xwiki:dom:updated and xwiki:docextra:loaded) now listens with jQuery through xwiki-events-bridge. Ajax calls use fetch.

 
cid:jira-generated-image-avatar-3d4de3da-8e80-4c27-bcfb-c73fb5db7f8f Marius Dumitru Florea on 08/Oct/26 13:48
 

Still to migrate, based on the inventory from 2026-10-01 minus what was migrated since. Paths are relative to xwiki-platform-web-war/src/main/webapp/resources/ unless a module is named.

Web WAR JavaScript

  • js/xwiki/xwiki.js: XWiki.Document / Attachment / currentDocument, the xwiki:dom:* lifecycle events, displayDocExtra (4x Ajax.Request). The Colibri code at lines 1599-1705 is dead.
  • uicomponents/suggest/suggest.js (XWiki.widgets.Suggest), together with its users: search-webjar searchSuggest.js, tree-webjar finder.js, search-ui QuickSearchUIX, and the oldcore Java that emits new ajaxSuggest(...)
  • js/xwiki/actionbuttons/actionButtons.js: the cancellable xwiki:actions:* events. Coupled with edit-ui XWiki.InplaceEditing, administration-ui XWiki.ConfigurableClass and XWikiFormSaveTarget.ts.
  • uicomponents/widgets/confirmedAjaxRequest.js: its options are Ajax.Request options, so it needs a fetch adapter
  • uicomponents/dashboard/dashboard.js: Scriptaculous Sortable / Draggables
  • uicomponents/extension/extension.js, uicomponents/extension/distribution.js, js/xwiki/importer/import.js
  • uicomponents/viewers/comments.js
  • js/xwiki/compatibility.js: the deprecated aliases
  • js/xwiki/panelwizard/panelWizard.js, plus the obsolete Drag.js and ieemu.js
  • js/xwiki/accordion/accordion.js (Scriptaculous Effect.*, used by Panels PanelWizard, RightsHelp and RightsTips): replace with Bootstrap collapse
  • js/xwiki/table/livetable.js and js/xwiki/usersandgroups/usersandgroups.js: retire by moving the #livetable callers and the rights UI to LiveData
  • livevalidation_prototype.js, loaded on every edit page: switch to the standalone LiveValidation build or to native constraint validation

Templates

  • flamingo docextra.vm, edit.vm, menus_content.vm, rightsUI.vm
  • register_macros.vm

Wiki pages and webjars in other modules

  • appwithinminutes-ui: ClassEditSheet, StaticList, LiveTableEditSheet, LiveTableViewSheet, Code.CSRFTokenRefresh, WizardStep, WebHome. The heaviest part: XWiki.FormField and xwiki:class:* are probably used by third-party field types, and it also uses Scriptaculous drag and drop.
  • annotation-ui: AnnotationCode.Script, Settings, AnnotationConfigSheet
  • attachment-ui: XWiki.AttachmentSelector
  • wiki-ui-mainwiki: WikiManager.CreateWiki, UserWikiSheet
  • index-ui: XWiki.DeletedDocuments, DeletedAttachments
  • user-profile-ui: XWikiUserSheet, XWikiUserNetworkSheet
  • panels-ui: Panels.Applications (Effect.BlindUp / BlindDown), PanelWizard, ClassSwitcher, RightsHelp, RightsTips
  • tour-ui: TourCode.StepSheet
  • realtime-webjar: loader.js
  • legacy-messagestream-ui: Main.MessageSenderMacro
  • repository-server-ui: ExtensionCode.SkinExtension
  • filter-ui: Filter.WebHome
  • help-ui: XWiki.XWikiSyntax
  • model-validation-ui: EntityNameValidation.Administration
  • security-authentication-ui: Authentication.Administration
  • notifications-ui: NotificationsWatchUIX

Once all of this is done, Prototype.js and Scriptaculous can stop being loaded globally (javascript.vm).

 
cid:jira-generated-image-avatar-3d4de3da-8e80-4c27-bcfb-c73fb5db7f8f Marius Dumitru Florea on 08/Oct/26 13:51
 

Closing this issue for now. We'll have to create other issues for the remaining work.