Bug 40161

Summary: New translation not displayed when translating an item type
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: TemplatesAssignee: Jonathan Druart <jonathan.druart>
Status: RESOLVED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: major    
Priority: P5 - low CC: david, fridolin.somers, lucas, m.de.rooy
Version: unspecifiedKeywords: rel_25_05_candidate, release-notes-needed
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.11.00,25.05.02
Circulation function:
Bug Depends on: 38255    
Bug Blocks:    
Attachments: Bug 40161: (bug 38255 follow-up) Fix item type translation JS error
Bug 40161: (bug 38255 follow-up) Fix item type translation JS error
Bug 40161: (bug 38255 follow-up) Fix item type translation JS error

Description Jonathan Druart 2025-06-18 11:41:17 UTC
Uncaught (in promise) TypeError: table.row is undefined
Comment 1 Jonathan Druart 2025-06-18 11:45:58 UTC
Created attachment 183327 [details] [review]
Bug 40161: (bug 38255 follow-up) Fix item type translation JS error

Uncaught (in promise) TypeError: table.row is undefined

We need to use the DataTable object.

Test plan:
Have several languages installed
Edit an item type and click "Translate into other languages" to open the
modal
Translate into another language and note that:
Without this patch you get a JS error in the browser console and the
row is not added to the table
With this patch applied the row is added correctly with your translation
Comment 2 Owen Leonard 2025-06-18 12:42:14 UTC
Created attachment 183328 [details] [review]
Bug 40161: (bug 38255 follow-up) Fix item type translation JS error

Uncaught (in promise) TypeError: table.row is undefined

We need to use the DataTable object.

Test plan:
Have several languages installed
Edit an item type and click "Translate into other languages" to open
the modal
Translate into another language and note that:
Without this patch you get a JS error in the browser console and the
row is not added to the table
With this patch applied the row is added correctly with your translation

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Marcel de Rooy 2025-06-24 14:33:08 UTC
Created attachment 183464 [details] [review]
Bug 40161: (bug 38255 follow-up) Fix item type translation JS error

Uncaught (in promise) TypeError: table.row is undefined

We need to use the DataTable object.

Test plan:
Have several languages installed
Edit an item type and click "Translate into other languages" to open
the modal
Translate into another language and note that:
Without this patch you get a JS error in the browser console and the
row is not added to the table
With this patch applied the row is added correctly with your translation

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2025-06-24 14:34:44 UTC
Just curious: Why change var to let here? It does not make any difference here (same block, same function). Do we have some rule about it?
Comment 5 Lucas Gass (lukeg) 2025-06-24 21:27:10 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 6 Paul Derscheid 2025-07-09 11:43:34 UTC
Nice work everyone!

Pushed to 25.05.x for 25.05.01
Comment 7 Fridolin Somers 2025-07-25 13:44:51 UTC
Depends on Bug 38255 not in 24.11.x
Comment 8 David Nind 2025-07-29 18:48:07 UTC
Bug fix, no changes to the manual required.