Bug 41665 - Only include Greybox in OPAC if IdRef is enabled
Summary: Only include Greybox in OPAC if IdRef is enabled
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: David Cook
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 34710 38366
  Show dependency treegraph
 
Reported: 2026-01-20 00:26 UTC by David Cook
Modified: 2026-01-20 23:29 UTC (History)
2 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 41665: Only include Greybox in OPAC if IdRef is enabled (1.46 KB, patch)
2026-01-20 00:31 UTC, David Cook
Details | Diff | Splinter Review
Bug 41665: Only include Greybox in OPAC if IdRef is enabled (1.51 KB, patch)
2026-01-20 15:41 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2026-01-20 00:26:15 UTC
Greybox is only used in the OPAC for the IdRef feature in the UNIMARC XSLT. So we should only include it in that context.
Comment 1 David Cook 2026-01-20 00:31:58 UTC
Created attachment 191659 [details] [review]
Bug 41665: Only include Greybox in OPAC if IdRef is enabled

This patch wraps the Greybox include in the OPAC with a syspref
check on IdRef, so that it's only loaded when it's needed.

Test plan:
0. Apply the patch
1. Go to http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=29
2. Search through the HTML or the Sources tab in F12 tools and note
that Greybox assets are not loaded
3. Enable the IdRef system preference
4. Note that the Greybox assets are loaded
Comment 2 Owen Leonard 2026-01-20 15:41:51 UTC
Created attachment 191708 [details] [review]
Bug 41665: Only include Greybox in OPAC if IdRef is enabled

This patch wraps the Greybox include in the OPAC with a syspref
check on IdRef, so that it's only loaded when it's needed.

Test plan:
0. Apply the patch
1. Go to http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=29
2. Search through the HTML or the Sources tab in F12 tools and note
   that Greybox assets are not loaded
3. Enable the IdRef system preference
4. Note that the Greybox assets are loaded

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 David Cook 2026-01-20 23:29:38 UTC
Legend. Thanks, Owen!