Bug 41081 - Link from 856$u points to http://%20%20%20%20
Summary: Link from 856$u points to http://%20%20%20%20
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Marcel de Rooy
QA Contact: Andrew Fuerste-Henry
URL:
Keywords:
Depends on:
Blocks: 41588
  Show dependency treegraph
 
Reported: 2025-10-23 08:41 UTC by Marcel de Rooy
Modified: 2026-01-12 17:28 UTC (History)
3 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:
If a 856$u for a record has just spaces instead of a URL, an invalid link was shown on the record page for the OPAC and staff interface (under 'Online resources'). Example: a record with four spaces added "Online resources" information to a record's page, with an invalid link to http://%20%20%20%20
Version(s) released in:
26.05.00
Circulation function:


Attachments
Bug 41081: Remove spaces around 856$u in results and detail xslt (4.29 KB, patch)
2025-10-23 09:03 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 41081: Remove spaces around 856$u in results and detail xslt (4.25 KB, patch)
2026-01-09 17:15 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2025-10-23 08:41:16 UTC
http://%20%20%20%20
We should not provide such useless links. The field only contained four spaces.
Comment 1 Marcel de Rooy 2025-10-23 09:03:26 UTC
Created attachment 188311 [details] [review]
Bug 41081: Remove spaces around 856$u in results and detail xslt

This patch does prevent creating useless links built on spaces like
http://%20%20%20%20 on the bug report.
A next step would be to stop preventing to create them when validating
during cataloguing.

Test plan:
Check without patch.
Create biblio with 856u having just a few spaces.
Verify that you see a useless Online resources link on OPAC or intranet
(detail and results).
Apply patch.
Restart all. Verify that you do not see the link anymore.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Marcel de Rooy 2025-10-23 09:03:58 UTC
Trivial fix. Four lines in xslt. Self SO
Comment 3 Andrew Fuerste-Henry 2026-01-09 17:15:57 UTC
Created attachment 191214 [details] [review]
Bug 41081: Remove spaces around 856$u in results and detail xslt

This patch does prevent creating useless links built on spaces like
http://%20%20%20%20 on the bug report.
A next step would be to stop preventing to create them when validating
during cataloguing.

Test plan:
Check without patch.
Create biblio with 856u having just a few spaces.
Verify that you see a useless Online resources link on OPAC or intranet
(detail and results).
Apply patch.
Restart all. Verify that you do not see the link anymore.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 4 Lucas Gass (lukeg) 2026-01-12 17:28:43 UTC
Nice work everyone!

Pushed to main for 26.05