David Cook
9fdceaa3b5
This patch uses the ErrorDocument middleware to use Koha's custom error pages instead of generic Plack error responses Test plan: 0. Apply patch 1. vi /usr/sbin/koha-plack (and change "development" to "deployment") 2. vi ./opac/opac-main.pl 3. Add "die" to line 2 4. vi ./mainpage.pl 5. Add "die" to line 2 6. cp ./debian/templates/plack.psgi /etc/koha/sites/kohadev/plack.psgi 7. koha-plack --restart kohadev 8. Go to http://localhost:8080/cgi-bin/koha/opac-main.pl 9. See a beautiful OPAC 500 error instead of "Internal Server Error" 10. Go to http://localhost:8080/cgi-bin/koha/blah.pl 11. See a beautiful OPAC 404 error instead of "not found" 12. Go to http://localhost:8081/cgi-bin/koha/mainpage.pl 13. See a beautiful Staff interface 500 error instead of "Internal Server Error" 14. Go to http://localhost:8081/cgi-bin/koha/blah.pl 15. See a beautiful Staff interface 404 error instead of "not found" For bonus points: 16. koha-plack --disable kohadev 17. koha-plack --stop kohadev 18. service apache restart 19. Repeat the above test plan to show CGI still works for 404 (although 500 will show "Software Error" due to C4::Context needing some improvements) 20. Using the "Network" tab on your developer tools, make sure 404 and 500 are returned by the appropriate error pages Signed-off-by: Eden Bacani <eden.bacani@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
||
---|---|---|
.. | ||
docs | ||
scripts | ||
source | ||
templates | ||
bd-to-depends | ||
build-git-snapshot | ||
changelog | ||
compat | ||
control | ||
control.in | ||
copyright | ||
koha-common.bash-completion | ||
koha-common.config | ||
koha-common.cron.d | ||
koha-common.cron.daily | ||
koha-common.cron.hourly | ||
koha-common.cron.monthly | ||
koha-common.default | ||
koha-common.dirs | ||
koha-common.docs | ||
koha-common.init | ||
koha-common.install | ||
koha-common.links | ||
koha-common.logrotate | ||
koha-common.postinst | ||
koha-common.preinst | ||
koha-common.README.Debian | ||
koha-common.templates | ||
koha-core.bash-completion | ||
koha-core.config | ||
koha-core.default | ||
koha-core.dirs | ||
koha-core.docs | ||
koha-core.init | ||
koha-core.install | ||
koha-core.links | ||
koha-core.logrotate | ||
koha-core.postinst | ||
koha-core.preinst | ||
koha-core.templates | ||
koha-full.postinst | ||
koha-post-install-setup | ||
koha.apache-ports | ||
koha.config | ||
koha.dirs | ||
koha.install | ||
koha.postinst | ||
koha.postrm | ||
koha.prerm | ||
koha.README.Debian | ||
list-deps | ||
README.build | ||
rules | ||
unavailable.html | ||
update-control |
In order to build .deb packages, following debian packages need to be present (installed): devscripts pbuilder dh-make fakeroot As root (or sudo) execute: pbuilder create Executing build-git-snapshot without any arguments will leave package and the rest in some pbuilder dir, eg. /var/cache/pbuilder/result It is highly recommended that --buildresult option is used.