[Bug 44265] New: Islands fail to load when they use components that import DataTables
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44265 Bug ID: 44265 Summary: Islands fail to load when they use components that import DataTables Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: pedro.amorim@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org Target Milestone: --- -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44265 --- Comment #1 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Created attachment 212561 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212561&action=edit Bug 44265: Resolve jQuery and DataTables from the page in islands Islands using components that load the component resolver (Dialog, FormElement) failed to hydrate, because the islands build is an ES module and its jQuery and DataTables externals became bare imports the browser can't resolve: "Failed to resolve module specifier "DataTable"" The islands build now takes them from the page's globals, like the other Vue builds. Test plan: 1) Before applying the patch, apply Bug 41091 (it adds an island that uses Dialog and FormElement) and run yarn js:build 2) Open an ILL request that has ISO18626 messages, e.g. http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=2 - no 'ISO18626 messages' section shows up - the browser console says: [islands] Island hydration failed: TypeError: Failed to resolve module specifier "DataTable" 3) Apply the patch, run yarn js:build, reload the page - the 'ISO18626 messages' section shows, 'View' opens the message 4) Check the existing islands still work, with no errors in the browser console: - the sidebar on http://localhost:8081/cgi-bin/koha/admin/branches.pl - the sidebar on http://localhost:8081/cgi-bin/koha/acqui/invoices.pl - 'Place booking' on http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=1 5) Run the island Cypress tests: yarn cypress run --spec "t/cypress/integration/Islands/*" Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44265 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pedro.amorim@openfifth.co.u | |k Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |pedro.amorim@openfifth.co.u |ity.org |k -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44265 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41091 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41091 [Bug 41091] Add ISO18626 to ILL for borrowing -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org