[Bug 41545] New: JS warning "redeclaration of let filters_options"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41545 Bug ID: 41545 Summary: JS warning "redeclaration of let filters_options" Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org Depends on: 38311 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38311 [Bug 38311] DataTables - Simplify the building of the dropdown list filters -- 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=41545 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=38190 Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |jonathan.druart@gmail.com |ity.org | --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Same as bug 38190. -- 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=41545 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41545 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 191026 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191026&action=edit Bug 41545: Remove JS warning "redeclaration of let filters_options" On the suggestions page more than one patron search is injected into the page that leads to JS warnings when the JS variable is defined with "let". We should use "var" in this case. Test plan: /cgi-bin/koha/suggestion/suggestion.pl?op=add_form&branchcode=CPL And notice that the warning does no longer appear when this patch is applied. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41545 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41545 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191026|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=41545 --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 191038 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191038&action=edit Bug 41545: Remove JS warning "redeclaration of let filters_options" On the suggestions page more than one patron search is injected into the page that leads to JS warnings when the JS variable is defined with "let". We should use "var" in this case. Test plan: /cgi-bin/koha/suggestion/suggestion.pl?op=add_form&branchcode=CPL And notice that the warning does no longer appear when this patch is applied. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41545 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #4 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. Go to Acquisitions > Suggestions 2. Use your web browser developer tools and have the console visible 3. Create a new suggestion: + New purchase suggestion 4. Note the warning in the console: Uncaught SyntaxError: Identifier 'filters_options' has already been declared 5. Apply the patch 6. Refresh the page 7. Note that there is no longer a warning -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41545 Bug 41545 depends on bug 38311, which changed state. Bug 38311 Summary: DataTables - Simplify the building of the dropdown list filters https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38311 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=41545 Brendan Lawlor <blawlor@clamsnet.org> 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=41545 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191038|0 |1 is obsolete| | --- Comment #5 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 191516 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191516&action=edit Bug 41545: Remove JS warning "redeclaration of let filters_options" On the suggestions page more than one patron search is injected into the page that leads to JS warnings when the JS variable is defined with "let". We should use "var" in this case. Test plan: /cgi-bin/koha/suggestion/suggestion.pl?op=add_form&branchcode=CPL And notice that the warning does no longer appear when this patch is applied. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41545 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |blawlor@clamsnet.org --- Comment #6 from Brendan Lawlor <blawlor@clamsnet.org> --- This works to fix the error: Uncaught SyntaxError: Identifier 'filters_options' has already been declared. It makes sense to change the declaration to var if patron-search.inc is included in the page. When testing I noticed another odd js error is sometimes logged to the console within the Select manager modal, but it seems to be Chrome specific and only when selecting a value from autofill in the search field. Uncaught ReferenceError: code is not defined But that is a different and very strange bug, so I am passing QA on this. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41545 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41579 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41579 [Bug 41579] Tidy kohaTable block - suggestions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41545 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |blawlor@clamsnet.org |y.org | CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41545 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41545 --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41545 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00 |26.05.00,25.11.02 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=41545 --- Comment #8 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41545 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED CC| |Laura.escamilla@bywatersolu | |tions.com Resolution|--- |FIXED --- Comment #9 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- This will not be backported to 25.05.x since it depends on bug 38311, which was not backported to that branch. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org