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

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 13 11:07:11 CEST 2022


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

Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jonathan.druart+koha at gmail.
                   |                            |com
             Status|BLOCKED                     |Failed QA

--- Comment #6 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
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.

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


More information about the Koha-bugs mailing list