| Summary: | Batch item deletion w/delete record and Elasticsearch is broken | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Magnus Enger <magnus> |
| Component: | Cataloging | Assignee: | Bugs List <koha-bugs> |
| Status: | NEW --- | QA Contact: | Testopia <testopia> |
| Severity: | major | ||
| Priority: | P5 - low | CC: | m.de.rooy |
| Version: | Main | Keywords: | regression, RM_priority |
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Crowdfunding goal: | 0 |
| Patch complexity: | --- | Documentation contact: | |
| Documentation submission: | Text to go in the release notes: | ||
| Version(s) released in: | Circulation function: | ||
Switching to SearchEngine = Zebra makes the delete work. I ran into a similar problem on a live server, with Koha 23.11.10 and Elasticsearch 7.16.2. That problem seems to have been solved by reversing the removal of "type => 'data'," from this patch: https://git.koha-community.org/Koha-community/Koha/commit/24aab6b9c52cb9846653d34d5630caf837e0508a but I have tested a similar fix on main, and that did not work. |
To reproduce in koha-testing-docker (I started it wirh "ktd --es7 up"): - Find a record with at least one item - Click on "Select all" for the items - Click on "Delete selected items" - Click the checkbox for "Delete records if no items remain." - Click on "Delete selected items" - Click on "View detail of the enqueued job" - The job failed Logs: ==> /var/log/koha/kohadev/worker-output.log <== {UNKNOWN}: An Elasticsearch error occurred during bulk delete at /kohadevbox/koha/Koha/BackgroundJob/BatchDeleteItem.pm line 153. at /kohadevbox/koha/Koha/BackgroundJob/BatchDeleteItem.pm line 177 [2024/12/18 08:55:39] [WARN] Uncaught exception processing job id=9: encountered object '{UNKNOWN}: An Elasticsearch error occurred during bulk delete at /kohadevbox/koha/Koha/BackgroundJob/BatchDeleteItem.pm line 153. at /kohadevbox/koha/Koha/BackgroundJob/BatchDeleteItem.pm line 177 ', but neither allow_blessed, convert_blessed nor allow_tags settings are enabled (or TO_JSON/FREEZE method missing) at /kohadevbox/koha/Koha/BackgroundJob.pm line 270. main::catch {...} /kohadevbox/koha/misc/workers/background_jobs_worker.pl (206) The job in the database: MariaDB [koha_kohadev]> select * from background_jobs where id = 9\G *************************** 1. row *************************** id: 9 status: failed progress: 0 size: 4 borrowernumber: 51 type: batch_item_record_deletion queue: long_tasks data: {"delete_biblios":"on","record_ids":["27","24","25","26"]} context: {"number":"51","register_name":null,"shibboleth":"0","branch":"CPL","cardnumber":"42","flags":"1","desk_name":null,"register_id":null,"emailaddress":null,"interface":"intranet","desk_id":null,"surname":"koha","id":"koha","firstname":null,"branchname":"Centerville"} enqueued_on: 2024-12-18 08:55:39 started_on: 2024-12-18 08:55:39 ended_on: NULL 1 row in set (0.000 sec)