[Koha-bugs] [Bug 31042] OVERRIDE_SYSPREF does not work for REST API

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Sep 21 04:11:49 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31042

--- Comment #9 from David Cook <dcook at prosentient.com.au> ---
(In reply to Jonathan Druart from comment #0)
> We are supposed to be able to override syspref's values using the
> OVERRIDE_SYSPREF trick, but it's not working for the REST API.
> 
> To recreate, open /etc/koha/apache-shared-intranet-plack.conf and add
>   RequestHeader add X-Koha-SetEnv "OVERRIDE_SYSPREF_Foo Bar"
> 
> Add some warn, mainpage.pl and Koha/REST/V1/Patrons.pm (sub list) for
> instance
> warn C4::Context->preference('Foo');
> 
> Hit the mainpage, look at the log, you see "Bar". Search for patrons: "Use
> of uninitialized value in warn"
> => The syspref hasn't been overridden.

tail -f /var/log/koha/kohadev/plack-intranet-error.log
[2023/09/21 02:10:38] [WARN] Bar at /kohadevbox/koha/mainpage.pl line 42.

tail -f /var/log/koha/kohadev/plack-api-error.log
[2023/09/21 02:11:27] [WARN] Use of uninitialized value in warn at
/kohadevbox/koha/Koha/REST/V1/Patrons.pm line 46.
[2023/09/21 02:11:27] [WARN] Warning: something's wrong at
/kohadevbox/koha/Koha/REST/V1/Patrons.pm line 46.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list