Bug 35680 - YAML system preferences cause error if syspref data is not YAML string
Summary: YAML system preferences cause error if syspref data is not YAML string
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-02 10:38 UTC by Pedro Amorim
Modified: 2024-01-02 20:17 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Amorim 2024-01-02 10:38:01 UTC
If a YAML preference has a string instead of the expected format, it'll cause an error - tested with RisExportAdditionalFields and ILLModuleDisclaimerByType but I'm sure others may cause this too.

To reproduce:

1) Add 'string' to RisExportAdditionalFields sys pref
2) Visit RIS export link:
/cgi-bin/koha/opac-export.pl?op=export&bib=262&format=ris
3) Notice the error
Can't use string ("string") as a HASH ref while "strict refs" in use at /kohadevbox/koha/C4/Ris.pm line 132

Not critical, but ideally an error like this should not happen in the event that a system preference has wrong data in it.

Adding bug 33431 as "See also" even though it's not the cause of the issue - as the test plans info there may also help here.