Bug 41722 - Argument "" isn't numeric in numeric gt (>)... warnings in opac-detail.tt
Summary: Argument "" isn't numeric in numeric gt (>)... warnings in opac-detail.tt
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-27 21:17 UTC by Roman Dolny
Modified: 2026-01-27 21:17 UTC (History)
0 users

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
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 Roman Dolny 2026-01-27 21:17:11 UTC
The warning:
[WARN] Argument "" isn't numeric in numeric gt (>) at 
/kohadevbox/koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
line 1578.
appears in the plack-opac-error.log.

It is quite strange because warning only appears when opac-detail.pl 
is used for very first time to show record.

To reproduce:
1a. Use a fresh KTD or
1b. edit opac-detail.tt (save an insignificant change, like add a space)
    and restart plack.
2. Observe plack-opac-error.log.
3. Go to any bibliographic record with items in OPAC.,
   e.g. search for "Perl template toolkit".
==> Warnings should appear in plack-opac-error.log
==> (as many as there are items).
4. Restart plack
5. Back to OPAC and refresh view of bibliographic record.
==> No warnings appear.
5. Repeat 1b., 4. and 5.
==> Warnings appear.

It seems that check of existens "item_level_holds" is needed before 
using it in IF condition, but I can't find why warning appers in log 
only once, not every time when "item_level_holds" is checked in IF.