[Koha-bugs] [Bug 30261] opac/tracklinks.pl renders 404 incorrectly

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon May 16 01:33:23 CEST 2022


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

--- Comment #8 from David Cook <dcook at prosentient.com.au> ---
(In reply to Marcel de Rooy from comment #6)
> There is something more going on here behind the scenes since we applied the
> errordocument changes to plack.psgi.
> 
> Whatever we are doing now in the arguments to output_error like:
> -    output_error( $cgi, '404' );
> +    output_error( $cgi, '404', { interface => 'opac' } );
> is completely useless.
> Why?
> 
> There is a fundamental flaw in output_error:
>     output_with_http_headers $query, $cookie, $template->output, 'html',
> '404 Not Found';
> Although we pass $error, it always outputs a 404. I tried sending a 403, and
> it does not work!
> 
> The 404 from output_error is caught by Plack middleware and it will output
> the 404 error document. In this case the OPAC 404 error document!
> 
> In other words, the bug description is invalid too. There is actually no
> problem when it is a 404.
> 
> But we found another problem. We should fix the hardcoded 404 for other
> errors.

I'll have another look at this one. 

Can you open a different bug for what you describe? Feel free to CC me in and
I'll take a look.

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


More information about the Koha-bugs mailing list