Bug 29255 - Built-in offline circulation broken with SQL error
Summary: Built-in offline circulation broken with SQL error
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Owen Leonard
QA Contact: Joonas Kylmälä
URL:
Keywords:
Depends on:
Blocks: 22671 29228 29371
  Show dependency treegraph
 
Reported: 2021-10-15 18:26 UTC by Owen Leonard
Modified: 2022-12-12 21:24 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.05,20.11.12,20.05.18


Attachments
Bug 29255: Built-in offline circulation broken with SQL error (1.80 KB, patch)
2021-10-15 18:35 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29255: Built-in offline circulation broken with SQL error (1.87 KB, patch)
2021-11-01 16:34 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29255: Built-in offline circulation broken with SQL error (2.01 KB, patch)
2021-11-13 13:35 UTC, Joonas Kylmälä
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2021-10-15 18:26:05 UTC
Testing the built-in offline circulation system in a browser which still supports applicationCache, I ran into this error:

DBD::mysql::st execute failed: Column 'branchcode' in field list is ambiguous at /kohadevbox/koha/offline_circ/download.pl line 84
Comment 1 Owen Leonard 2021-10-15 18:35:57 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2021-10-18 12:42:52 UTC
It wasn't until I tested this in a new instance of KTD that this ALSO suffers from SQL errors if SQL strict mode is on, so please test with strict mode off.
Comment 3 Owen Leonard 2021-10-29 11:27:04 UTC
The strict mode problem is now described in Bug 29371.
Comment 4 Martin Renvoize 2021-11-01 16:34:56 UTC Comment hidden (obsolete)
Comment 5 Joonas Kylmälä 2021-11-13 13:35:52 UTC
Created attachment 127607 [details] [review]
Bug 29255: Built-in offline circulation broken with SQL error

This patch makes a minor correction to one of the queries used when
synchronizing transactions in the built-in offline circulation system.
This fixes the error:

DBD::mysql::st execute failed: Column 'branchcode' in field list is
ambiguous at /kohadevbox/koha/offline_circ/download.pl line 84

To test you must be using a browser which still supports
applicationCache (Firefox before version 81, Chrome before version 94).

- Apply the patch and restart services.
- Enable the AllowOfflineCirculation system preference.
- Go to Circulation -> Built-in offline circulation interface.
- Click "Synchronize."
- Click the "Download records" button.
- After the page refreshes you should see updated dates where it lists
  "last synced" information.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Comment 6 Jonathan Druart 2021-11-15 11:39:51 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 7 Kyle M Hall 2021-11-19 15:51:12 UTC
Pushed to 21.05.x for 21.05.05
Comment 8 Fridolin Somers 2021-11-20 00:00:53 UTC
Pushed to 20.11.x for 20.11.12
Comment 9 Victor Grousset/tuxayo 2021-11-21 21:48:17 UTC
Backported: Pushed to 20.05.x branch for 20.05.18
Comment 10 wainuiwitikapark 2021-11-23 00:27:02 UTC
Not backporting to 19.11.x - LTS version will just backport security patches