[Bug 40150] New: Prevent uncaught error on multiple attempts to 'define' on 'CustomElementsRegistry' in islands.ts
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40150 Bug ID: 40150 Summary: Prevent uncaught error on multiple attempts to 'define' on 'CustomElementsRegistry' in islands.ts Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: paul.derscheid@lmscloud.de QA Contact: testopia@bugs.koha-community.org The CustomElementRegistry does not permit multiple definition attempts on the same name of the custom element in the same context. This does not lead to an actual bug in behaviour, but it's an uncaught error that should be caught. Maybe it would also make sense to have a console.debug that warns (if full output is enabled) that this is happening. -- 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=40150 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=40150 --- Comment #1 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 183287 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183287&action=edit [DO NOT PUSH] Bug 40150: Set up a duplicate call to hydrate() -- 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=40150 --- Comment #2 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 183288 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183288&action=edit Bug 40150: Prevent uncaught error on multiple attempts to 'define' on 'CustomElementsRegistry' in islands.ts If the name is already in use, we just return. It might make sense to have a console.debug() or similar to notify developers that this is happening. Open for other opinions. To test: 1) Apply the first patch which adds an additional hydrate call in main-container.inc 2) Go to acqui/acqui-home.pl 3) Verify that you see this error in the dev tool's console tab: Uncaught (in promise) NotSupportedError: Failed to execute 'define' on 'CustomElementRegistry': the name "acquisitions-menu" has already been used with this registry 4) Apply the second patch 5) Run `yarn js:build` in ktd (assuming ktd). 6) Reload the page without cached assets (Ctrl/Cmd + Shift + R) and verify that the uncaught error is gone. 7) Sign off. There's an additional problem here I (and probably you) noticed. But that's unrelated to this bug. -- 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=40150 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=40150 --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 183292 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183292&action=edit Bug 40150: Set up a duplicate call to hydrate() Signed-off-by: David Nind <david@davidnind.com> -- 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=40150 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183288|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 183293 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183293&action=edit Bug 40150: Prevent uncaught error on multiple attempts to 'define' on 'CustomElementsRegistry' in islands.ts If the name is already in use, we just return. It might make sense to have a console.debug() or similar to notify developers that this is happening. Open for other opinions. To test: 1) Apply the first patch which adds an additional hydrate call in main-container.inc 2) Go to acqui/acqui-home.pl 3) Verify that you see this error in the dev tool's console tab: Uncaught (in promise) NotSupportedError: Failed to execute 'define' on 'CustomElementRegistry': the name "acquisitions-menu" has already been used with this registry 4) Apply the second patch 5) Run `yarn js:build` in ktd (assuming ktd). 6) Reload the page without cached assets (Ctrl/Cmd + Shift + R) and verify that the uncaught error is gone. 7) Sign off. There's an additional problem here I (and probably you) noticed. But that's unrelated to this bug. Signed-off-by: David Nind <david@davidnind.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=40150 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |me@paulderscheid.xyz |ity.org | CC| |david@davidnind.com --- Comment #5 from David Nind <david@davidnind.com> --- Added assignee. For some reason, the name for the [DO NOT PUSH] patch was changed. I'll obsolete my signed off patch.
There's an additional problem here I (and probably you) noticed. But that's unrelated to this bug.
[Violation] 'setTimeout' handler took 62ms? Otherwise, no idea. 8-) -- 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=40150 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183292|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40150 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40150 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183293|0 |1 is obsolete| | --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 184976 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184976&action=edit Bug 40150: Prevent uncaught error on multiple attempts to 'define' on 'CustomElementsRegistry' in islands.ts If the name is already in use, we just return. It might make sense to have a console.debug() or similar to notify developers that this is happening. Open for other opinions. To test: 1) Apply the first patch which adds an additional hydrate call in main-container.inc 2) Go to acqui/acqui-home.pl 3) Verify that you see this error in the dev tool's console tab: Uncaught (in promise) NotSupportedError: Failed to execute 'define' on 'CustomElementRegistry': the name "acquisitions-menu" has already been used with this registry 4) Apply the second patch 5) Run `yarn js:build` in ktd (assuming ktd). 6) Reload the page without cached assets (Ctrl/Cmd + Shift + R) and verify that the uncaught error is gone. 7) Sign off. There's an additional problem here I (and probably you) noticed. But that's unrelated to this bug. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40150 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40150 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40150 --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40150 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.11.00 |25.11.00,25.05.04 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40150 --- Comment #8 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40150 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |37911 CC| |fridolin.somers@biblibre.co | |m Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37911 [Bug 37911] Prototype vue islands within static pages -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40150 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 37911 not in 24.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40150 Bug 40150 depends on bug 37911, which changed state. Bug 37911 Summary: Prototype vue islands within static pages https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37911 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40150 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Needs documenting |RESOLVED --- Comment #10 from David Nind <david@davidnind.com> --- Architecture relation, no changes required to the manual as far as I can tell. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org