From ba9f768c09d196c5902194861566ff22a12aca30 Mon Sep 17 00:00:00 2001 From: Hammat Wele Date: Fri, 24 Oct 2025 20:03:00 +0000 Subject: [PATCH] Bug 41102: Error 500 on the About page when biblioserver Zebra configuration is missing When either the entry or the section is not present in koha-conf.xml, the Intranet > About page triggers a 500 Internal Server Error. To test: 2. Restart Apache: sudo systemctl restart apache2 3. Go to Intranet -> About ==> Internal Server Error (500) 4. Now restore the line and instead comment out the entire ... block. 5. Repeat step 2, 3 ==> Internal Server Error (500) 6. Apply the patch 7. Repeat step 2, 3 ==> There is no Error (500) 8. Uncomment and Repeat Step 1 9. Repeat step 2, 3 ==> There is no Error (500) --- C4/Context.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/C4/Context.pm b/C4/Context.pm index 78602055164..42762b74753 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -572,17 +572,19 @@ sub _new_Zconn { $syntax = 'xml'; $elementSetName = 'marcxml'; - my $host = _common_config( $server, 'listen' )->{content}; + my $host = _common_config( $server, 'listen' ); + $host = $host->{content}; my $serverinfo = _common_config( $server, 'serverinfo' ); my $user = $serverinfo->{user}; my $password = $serverinfo->{password}; eval { # set options my $o = ZOOM::Options->new(); - $o->option( user => $user ) if $user && $password; - $o->option( password => $password ) if $user && $password; - $o->option( async => 1 ) if $async; - $o->option( cqlfile => _common_config( $server, 'server' )->{cql2rpn} ); + $o->option( user => $user ) if $user && $password; + $o->option( password => $password ) if $user && $password; + $o->option( async => 1 ) if $async; + my $server_conf = _common_config( $server, 'server' ); + $o->option( cqlfile => $server_conf->{cql2rpn} ); $o->option( cclfile => $serverinfo->{ccl2rpn} ); $o->option( preferredRecordSyntax => $syntax ); $o->option( elementSetName => $elementSetName ) if $elementSetName; -- 2.34.1