Custom org tree with no org units causes TPAC server error

Bug #1254146 reported by Bill Erickson on 2013-11-22
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Evergreen 2.3+

Having a row in actor.org_unit_custom_tree with the purpose of "opac" without any corresponding entries in actor.org_unit_custom_tree_node produces a 500 internal server error in the TPAC.

Apache reports:

egweb: template error: undef error - Can't call method "org_unit" on an undefined value at /usr/local/share/perl/5.10.1/OpenILS/WWW/EGCatLoader/ line 185.\n

The code assumes the existence of a tree implies the existence of at least one node. However, a tree can be node-less in the wild, most notably when then tree is being edited.

Bill Erickson (berick) wrote :

Pushed fix to user/berick/lp1254146-custom-tree-no-entries

To test:

 insert into actor.org_unit_custom_tree (active, purpose) values (true, 'opac');

Loading the TPAC should produce a 500 error. After the patch is applied, the 500 error should no longer occur.

Changed in evergreen:
milestone: none → 2.5.1
tags: added: pullrequest
Bill Erickson (berick) wrote :

Adding pullrequest; targeting 2.3 since we're re-cutting 2.3 next week; perhaps it will get merged...

Ben Shum (bshum) wrote :

Replicated the bug on a fresh system (ours already had a deactivated opac entry with org units, so we couldn't test the original bug there). Works to resolve the issue.

Picked to master, rel_2_5, rel_2_4, and rel_2_3. Thanks Bill!

Changed in evergreen:
status: New → Fix Committed
importance: Undecided → Medium
Ben Shum (bshum) on 2013-12-06
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers