Bug 35136 - Error during database update after Bug 31383
Summary: Error during database update after Bug 31383
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords: rel_23_11_candidate
Depends on: 31383
Blocks:
  Show dependency treegraph
 
Reported: 2023-10-23 17:12 UTC by Owen Leonard
Modified: 2023-10-26 06:58 UTC (History)
10 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00


Attachments
Bug 35136: (bug 31383 follow-up) Fix db rev (850 bytes, patch)
2023-10-24 06:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 35136: (bug 31383 follow-up) Fix db rev (905 bytes, patch)
2023-10-24 12:22 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 35136: (bug 31383 follow-up) Fix db rev (961 bytes, patch)
2023-10-24 15:50 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2023-10-23 17:12:22 UTC
I've run across a case where the database upgrade in Bug 31383 triggers an error. The error is:

 ERROR - {UNKNOWN}: Not a HASH reference at /kohadevbox/koha/installer/data/mysql/db_revs/230600041.pl line 130. at /kohadevbox/koha/C4/Installer.pm line 741

I noticed that the error didn't happen if I deleted the 'ISSUESLIP' notice before running the upgrade, and that the error only happened with my custom testing database, not the default Koha testing data.

Comparing the contents of ISSUESLIP in my data and in the default, I see this difference:

In my data:

<p style="margin-bottom: 1px; margin-top: 1px"><<additional_contents.new>></p>

In the default data:

<p style="margin-bottom: 1px; margin-top: 1px"><<additional_contents.content>></p>

I'm not sure where the difference comes in, or how common this case might be in the wild.
Comment 1 Jonathan Druart 2023-10-24 06:07:52 UTC
Created attachment 157724 [details] [review]
Bug 35136: (bug 31383 follow-up) Fix db rev
Comment 2 Jonathan Druart 2023-10-24 06:08:03 UTC
There is an obvious mistake, could you try with this patch please?
Comment 3 Tomás Cohen Arazi 2023-10-24 12:22:15 UTC
Created attachment 157740 [details] [review]
Bug 35136: (bug 31383 follow-up) Fix db rev

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Victor Grousset/tuxayo 2023-10-24 15:50:31 UTC
Created attachment 157750 [details] [review]
Bug 35136: (bug 31383 follow-up) Fix db rev

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 5 Victor Grousset/tuxayo 2023-10-24 15:52:16 UTC
Works, makes sense, QA script happy, code looks good, passing QA :)

Reproduced the error and confirmed that with the fix, updatedatabase works and notifies that ISSUESLIP needs to be manually fixed.
Comment 6 Tomás Cohen Arazi 2023-10-24 18:45:23 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 7 Fridolin Somers 2023-10-26 06:58:11 UTC
Depends on Bug 31383 not in 23.05.x