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

--- Comment #4 from Martin Renvoize (ashimema) 
<[email protected]> ---
Thanks David, good catch. No, nothing else was missing from your side: the
first patch only stopped Apache turning record_sources.pl into
record_sources.pl.pl, so the script was served, but the Vue router only knows
the URLs without the .pl and rendered nothing. My test plan was wrong to say
the pages would load.

I have attached a follow-up that fixes the actual problem rather than papering
over it. Logging back in after a session timeout now returns to the page the
user was on:
- the login form keeps the path info (the Vue route) of the script it posts to,
e.g. record_sources.pl/edit/3, via Koha::AuthUtils::get_script_name;
- the rewrite rules also leave the script alone when it is requested with a
path info;
- the Vue pages take the .pl out of the address before the router reads it,
keeping the route, query string and hash.

To test, after applying both patches: restart_all and yarn js:build. In KTD the
Apache configuration is generated when KTD starts from debian/templates, so it
needs regenerating for the rewrite rules (a fresh kd up / ktd up with the
patches applied does it). Then:
1. Logged in, visit /cgi-bin/koha/admin/record_sources.pl and
/cgi-bin/koha/admin/record_sources.pl/add => the pages load, at the URL without
.pl (same for circulation_triggers).
2. Open /cgi-bin/koha/admin/record_sources/add, log out in another tab, reload
and log in => you land on the add form, not a 404 or an empty page (same for
circulation_triggers/add).

There is a Cypress spec (t/cypress/integration/Admin/VuePagesLogin_spec.ts) and
a get_script_name test in t/db_dependent/AuthUtils.t; koha-qa is clean. Would
you be able to test again?

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to