[Koha-bugs] [Bug 33873] ILL requests with linked biblio_id that no longer exists causes table to not render

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 2 15:59:39 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33873

--- Comment #12 from Pedro Amorim <pedro.amorim at ptfs-europe.com> ---
Upping this to blocker to raise awareness.

Without this fix, systems upgrading to 22.11.06 or 23.05 will potentially have
their ILL table not be functional.

If the upgrade happens on a system that has ILL requests with a biblio record
related to it, that has since been deleted, the table will fail to render.

To reproduce, on clean k-t-d master:
1) ILL setup, run:
bash <(curl -s
https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Create a new FreeForm request, put whatever data you want in the form.
3) Go back to ILL requests table, notice the table renders and request is
there.
4) Run

koha-mysql kohadev

# Drop the FK constraint, or it wont allow us to run next step:
ALTER TABLE illrequests DROP FOREIGN KEY illrequests_bibfk;

# Update biblio_id on the ILL request to a biblionumber that doesn't exist:
UPDATE illrequests SET biblio_id=999 where illrequest_id = 1;

5) Refresh the ILL table, notice it never renders and has a nasty console
error:
Cannot read properties of null (reading 'biblio_id')

This is what happens on upgrade from previous versions.

6) Apply this patch
7) Refresh table again, notice it renders correctly once more

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list