When one of this modules is tried, with either wrong credentials or a user without access, the Auth.pm code short-circuits to the login page, but the KOHA_VERSION template param is never set.
Created attachment 73319 [details] [review] Bug 20480: Make KOHA_VERSION available to all templates in all circumstances This patch makes C4::Templates::gettemplate set the KOHA_VERSION param for the template. This way this template parameter, which is required by (probably) all pages that include CSS/JS content is available in all circumstances. A noticeable problem with the current approach is when using the SCO and SCI modules with wrong/forbidden users: C4::Auth short-circuits and redirects to the login page, without setting the KOHA_VERSION param. This patch solves it for good. To test: - Enable the SCI module - Open the browser at http://localhost:8080/cgi-bin/koha/sci/sci-main.pl - Login with the db user (koha_kohadev / password) => FAIL: Login failure, but styling is broken - Apply this patch - Retry => SUCCESS: Everything looks as it should! - Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 73330 [details] [review] Bug 20480: send KOHA_VERSION even if only one language is enabled
Created attachment 73332 [details] [review] Bug 20480: send KOHA_VERSION even if only one language is enabled Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 73333 [details] [review] Bug 20480: Make KOHA_VERSION available to all templates in all circumstances This patch makes C4::Templates::gettemplate set the KOHA_VERSION param for the template. This way this template parameter, which is required by (probably) all pages that include CSS/JS content is available in all circumstances. A noticeable problem with the current approach is when using the SCO and SCI modules with wrong/forbidden users: C4::Auth short-circuits and redirects to the login page, without setting the KOHA_VERSION param. This patch solves it for good. To test: - Enable the SCI module - Open the browser at http://localhost:8080/cgi-bin/koha/sci/sci-main.pl - Login with the db user (koha_kohadev / password) => FAIL: Login failure, but styling is broken - Apply this patch - Retry => SUCCESS: Everything looks as it should! - Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 73334 [details] [review] Bug 20480: send KOHA_VERSION even if only one language is enabled Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 18.05