[Bug 43211] New: Koha hungs when receiving order with AcqCreateItem set to 'receiving an order'
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43211 Bug ID: 43211 Summary: Koha hungs when receiving order with AcqCreateItem set to 'receiving an order' Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: januszop@gmail.com QA Contact: testopia@bugs.koha-community.org CC: jonathan.druart@gmail.com Blocks: 41563 Target Milestone: --- Koha hangs when receiving an order with AcqCreateItem set to "receiving an order". The JavaScript console shows: Uncaught TypeError: unique_item_fields.split is not a function This is most likely caused by the changes introduced in bug 41563. Koha.addPrefs({ [...] UniqueItemFields: [% Koha.Preference('UniqueItemFields') ? 1 : 0 | html %], }); UniqueItemFields should not be reduced to a number. It is expected to be a string containing a list of item fields separated by pipes (|), which is why the code later calls split() on it. To reproduce: 1. Create a basket and set "Create items when" to "receiving an order". 2. Add an order and close the basket. 3. Attempt to receive the order. Koha will most likely hang. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41563 [Bug 41563] Tidy kohaTable block - acqui -- 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=43211 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Koha hungs when receiving |Koha hangs when receiving |order with AcqCreateItem |order with AcqCreateItem |set to 'receiving an order' |set to 'receiving an order' -- 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=43211 --- Comment #1 from Janusz Kaczmarek <januszop@gmail.com> --- Simple correction to koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt would probably fix the problem: @@ -462,7 +462,7 @@ const only_one_order = [% only_one_order ? 1 : 0 | html %]; Koha.addPrefs({ AcqCreateItem: [% Koha.Preference('AcqCreateItem') ? 1 : 0 | html %], - UniqueItemFields: [% Koha.Preference('UniqueItemFields') ? 1 : 0 | html %], + UniqueItemFields: [% Koha.Preference('UniqueItemFields') ? Koha.Preference('UniqueItemFields') : '' | html %], }); Koha.addPermissions({ CAN_user_acquisition: [% CAN_user_acquisition ? 1 : 0 | html %], -- 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=43211 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |januszop@gmail.com |ity.org | Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- 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=43211 --- Comment #2 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 202878 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202878&action=edit Bug 43211: Koha hangs when receiving order with AcqCreateItem set to 'receiving an order' Koha hangs when receiving an order with AcqCreateItem set to "receiving an order". Test plan: 1. Create a basket and set "Create items when" to "receiving an order". 2. Add an order and close the basket. 3. Attempt to receive the order. Koha will most likely hang. 4. Apply the patch; restart_all. 5. Repeat p. 3. You should be able co proceed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43211 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- This does fix the issue with the page "hanging". However, I've Failed QA as there is a new(?)/another console error now that clicking "Receive" works: Uncaught ReferenceError: barcode is not defined at orderreceive.pl?mult…invoiceid=1:1877:31... Not sure if that is caused by this bug, or if it was there before. Testing notes (using KTD): 1. Step 3 - "hanging": 1.1 Click "Receive" 1.2 Sits on "Processing..." 1.3 Web developer tools has this error in the console: "Uncaught TypeError: unique_item_fields.split is not a function..." -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43211 Andrii Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=42605 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43211 --- Comment #4 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 203787 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203787&action=edit Bug 43211: (follow-up) fix 'barcode is not defined' error Patch from commit 9260eaf -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43211 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com, | |hammat.wele@inlibro.com, | |philippe.blouin@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43211 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43211 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=43211 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202878|0 |1 is obsolete| | Attachment #203787|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=43211 --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 203816 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203816&action=edit Bug 43211: Koha hangs when receiving order with AcqCreateItem set to 'receiving an order' Koha hangs when receiving an order with AcqCreateItem set to "receiving an order". Test plan: 1. Create a basket and set "Create items when" to "receiving an order". 2. Add an order and close the basket. 3. Attempt to receive the order. Koha will most likely hang. 4. Apply the patch; restart_all. 5. Repeat p. 3. You should be able co proceed. 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=43211 --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 203817 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203817&action=edit Bug 43211: (follow-up) fix 'barcode is not defined' error 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=43211 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes an error when release notes| |receiving an order, when | |the basket has "Create | |items when" set to | |"receiving an order". | |Orders can now be received | |when this is the case. | | | |Previously, receiving an | |order would result in the | |page staying on | |"Processing", and nothing | |further happening (as well | |as a browser console | |JavaScript error "Uncaught | |TypeError: | |unique_item_fields.split is | |not a function"). --- Comment #7 from David Nind <david@davidnind.com> --- There is now another console error, but I think that is related to the URL I use when testing using KTD and the staffClientBaseURL system preference: Executing inline script violates the following Content Security Policy directive 'script-src 'self' 'nonce-CQ06Uey_ZsBjaJO1ue1WxR''. Either the 'unsafe-inline' keyword, a hash ('sha256-wihnqW+7il7w5Tc+zNUaLVAv6jIAUH20wvt6umRVLw0='), or a nonce ('nonce-...') is required to enable inline execution. The policy is report-only, so the violation has been logged but no further action has been taken -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43211 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43211 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |blocker --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This breaks the workflow of receiving items and is present in 26.05, updating to blocker. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43211 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to David Nind from comment #7)
There is now another console error, but I think that is related to the URL I use when testing using KTD and the staffClientBaseURL system preference:
Executing inline script violates the following Content Security Policy directive 'script-src 'self' 'nonce-CQ06Uey_ZsBjaJO1ue1WxR''. Either the 'unsafe-inline' keyword, a hash ('sha256-wihnqW+7il7w5Tc+zNUaLVAv6jIAUH20wvt6umRVLw0='), or a nonce ('nonce-...') is required to enable inline execution. The policy is report-only, so the violation has been logged but no further action has been taken
I think this should be filed separately. I am not sure if 26.05 has the nonce yet, but I believe not? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43211 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43211 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #203816|0 |1 is obsolete| | Attachment #203817|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=43211 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 203851 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203851&action=edit Bug 43211: Koha hangs when receiving order with AcqCreateItem set to 'receiving an order' Koha hangs when receiving an order with AcqCreateItem set to "receiving an order". Test plan: 1. Create a basket and set "Create items when" to "receiving an order". 2. Add an order and close the basket. 3. Attempt to receive the order. Koha will most likely hang. 4. Apply the patch; restart_all. 5. Repeat p. 3. You should be able co proceed. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43211 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 203852 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203852&action=edit Bug 43211: (follow-up) fix 'barcode is not defined' error Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43211 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Katrin Fischer from comment #9)
(In reply to David Nind from comment #7)
There is now another console error, but I think that is related to the URL I use when testing using KTD and the staffClientBaseURL system preference:
Executing inline script violates the following Content Security Policy directive 'script-src 'self' 'nonce-CQ06Uey_ZsBjaJO1ue1WxR''. Either the 'unsafe-inline' keyword, a hash ('sha256-wihnqW+7il7w5Tc+zNUaLVAv6jIAUH20wvt6umRVLw0='), or a nonce ('nonce-...') is required to enable inline execution. The policy is report-only, so the violation has been logged but no further action has been taken
I think this should be filed separately. I am not sure if 26.05 has the nonce yet, but I believe not?
Filed as: Bug 43350 - JS error when receiving an order with items "created on receive" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43211 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pedro.amorim@openfifth.co.u | |k --- Comment #13 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Hi guys, not a blocker here but shouldn't we apply the same fix to the line above this? For AcqCreateItem itself. AcqCreateItem is a 3-value pref (ordering/receiving/cataloguing) compared directly against those strings throughout orderreceive.tt (tax rate, item-association, Quantity field readonly state), but it's still just 1/0. Test plan: 1. Set AcqCreateItem to "receiving an order" 2. Create a new basket, leave "Create items when" at default (no override) 3. Add an order, close basket, receive it 4. Type in console: Koha.prefs.AcqCreateItem # Shows as 1, no 'receiving'. 5. "Quantity" field is editable, should be readonly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43211 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.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=43211 --- Comment #14 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Thanks everyone! Pushed to main for 26.11! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43211 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Pedro Amorim (ammopt) from comment #13)
Hi guys, not a blocker here but shouldn't we apply the same fix to the line above this? For AcqCreateItem itself.
AcqCreateItem is a 3-value pref (ordering/receiving/cataloguing) compared directly against those strings throughout orderreceive.tt (tax rate, item-association, Quantity field readonly state), but it's still just 1/0.
Test plan: 1. Set AcqCreateItem to "receiving an order" 2. Create a new basket, leave "Create items when" at default (no override) 3. Add an order, close basket, receive it 4. Type in console: Koha.prefs.AcqCreateItem # Shows as 1, no 'receiving'. 5. "Quantity" field is editable, should be readonly
I won't be able to work again on this before mid of next week. But I think you are right that we should fix and make sure it gets into stable. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43211 --- Comment #16 from David Nind <david@davidnind.com> --- (In reply to Katrin Fischer from comment #12)
Filed as: Bug 43350 - JS error when receiving an order with items "created on receive"
Thanks Katrin! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43211 --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Katrin Fischer from comment #15)
(In reply to Pedro Amorim (ammopt) from comment #13)
Hi guys, not a blocker here but shouldn't we apply the same fix to the line above this? For AcqCreateItem itself.
AcqCreateItem is a 3-value pref (ordering/receiving/cataloguing) compared directly against those strings throughout orderreceive.tt (tax rate, item-association, Quantity field readonly state), but it's still just 1/0.
Test plan: 1. Set AcqCreateItem to "receiving an order" 2. Create a new basket, leave "Create items when" at default (no override) 3. Add an order, close basket, receive it 4. Type in console: Koha.prefs.AcqCreateItem # Shows as 1, no 'receiving'. 5. "Quantity" field is editable, should be readonly
I won't be able to work again on this before mid of next week. But I think you are right that we should fix and make sure it gets into stable.
I believe we had a partial duplicate without noticing in bug 43211. It solves both cases. So we can reuse that bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43211 --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> ---
I won't be able to work again on this before mid of next week. But I think you are right that we should fix and make sure it gets into stable.
I believe we had a partial duplicate without noticing in bug 43211. It solves both cases. So we can reuse that bug.
Bug 42605! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org