Bug 37531 - Cannot access circulation rules page
Summary: Cannot access circulation rules page
Status: RESOLVED DUPLICATE of bug 37255
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: 24.05
Hardware: All All
: P5 - low major
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords: RM_priority
Depends on:
Blocks:
 
Reported: 2024-07-30 21:17 UTC by Isabel Pineda
Modified: 2024-08-12 14:11 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Isabel Pineda 2024-07-30 21:17:27 UTC
After updating from 24.05.01 to 24.05.02, I get a 500 error, when I click go to Administration and click on the link "Circulation and Fine Rules". 

The log file says: 
[Tue Jul 30 15:01:44.055849 2024] [cgi:error] [pid 1353630] [client 190.5.137.178:39567] AH01215: Template process failed: undef error - Can't call method "description" on an undefined value at /usr/share/koha/lib/Koha/Template/Plugin/Categories.pm line 39.: /usr/share/koha/intranet/cgi-bin/admin/smart-rules.pl, referer: https://biblioteca-intra.ds.edu.sv/cgi-bin/koha/admin/admin-home.pl
Comment 1 Katrin Fischer 2024-07-31 09:50:53 UTC
Hi Isabel, I think maybe you have a circulation rule set for an itemtype code that was deleted. Are you able to verify that with SQL maybe?
Comment 2 Emily Lamancusa 2024-07-31 15:24:25 UTC
This sounds like bug 37255 or bug 37263. Do you have a Default waiting hold cancellation policy for All patron categories and All item types? Or, if your system allows article requests, do you have a Default article request fee rule defined for All patron categories?
Comment 3 Harsha 2024-08-06 20:07:35 UTC
I also experiencing the same issue after upgrading version to 24.05.02; Error 500 when click the  "Circulation and fine rules" in Administration Panel.  Same Log error
Comment 4 Katrin Fischer 2024-08-07 10:00:02 UTC
(In reply to Harsha from comment #3)
> I also experiencing the same issue after upgrading version to 24.05.02;
> Error 500 when click the  "Circulation and fine rules" in Administration
> Panel.  Same Log error

Please have a look at the comment above from Emily.
Comment 5 Isabel Pineda 2024-08-08 19:43:28 UTC
I`m sorry, I didn't answer, I was on vacation. 

(In reply to Katrin Fischer from comment #1)
> Hi Isabel, I think maybe you have a circulation rule set for an itemtype
> code that was deleted. Are you able to verify that with SQL maybe?

No, I haven't deleted any item types ultimately. 

(In reply to Emily Lamancusa from comment #2)
> This sounds like bug 37255 or bug 37263. Do you have a Default waiting hold
> cancellation policy for All patron categories and All item types? Or, if
> your system allows article requests, do you have a Default article request
> fee rule defined for All patron categories?

I know that I have some rules for All patron caterories and some rules for All item types, but I don't think that I have any rule for All Patron categories and All item types at the same time.


When I look at the data of the table 'circulation_rules', I find 773 rows of data. I am sure that I don't haven't set up that many rules, and I am not sure what I have to look for.
Comment 6 Emily Lamancusa 2024-08-08 19:49:26 UTC
Each individual cell in the circulation rules table is its own row in the database, so that's why it seems like such an excessive number of rows!

In this case, you would be looking for a row with the following values:
branchcode: null (will be blank in the report)
categorycode: null
itemtype: null
rule_name: waiting_hold_cancellation or article_request_fee
Comment 7 Isabel Pineda 2024-08-08 21:54:16 UTC
(In reply to Emily Lamancusa from comment #6)
> Each individual cell in the circulation rules table is its own row in the
> database, so that's why it seems like such an excessive number of rows!
> 
> In this case, you would be looking for a row with the following values:
> branchcode: null (will be blank in the report)
> categorycode: null
> itemtype: null
> rule_name: waiting_hold_cancellation or article_request_fee

Yes, I have one row with 
branchcode: null 
categorycode: null
itemtype: null
rule_name: waiting_hold_cancellation 
rule_value: 0

What do I have to do with it?
Comment 8 Emily Lamancusa 2024-08-09 19:06:35 UTC
Okay, that confirms that bug 37255 is indeed the cause of the 500 error. The fix hasn't been backported to 24.05 yet, but in the meantime, if you're confident in deleting just that one row without affecting any others, that should fix the 500 error. "No" is the default behavior, so you won't need to do anything else.

*** This bug has been marked as a duplicate of bug 37255 ***
Comment 9 Isabel Pineda 2024-08-12 14:11:51 UTC
(In reply to Emily Lamancusa from comment #8)
> Okay, that confirms that bug 37255 is indeed the cause of the 500 error. The
> fix hasn't been backported to 24.05 yet, but in the meantime, if you're
> confident in deleting just that one row without affecting any others, that
> should fix the 500 error. "No" is the default behavior, so you won't need to
> do anything else.
> 
> *** This bug has been marked as a duplicate of bug 37255 ***

Thank you, deleting the row fixed the problem.