Summary: | Language attribute in html tag is empty in system preference editor | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | Staff interface | Assignee: | Katrin Fischer <katrin.fischer> |
Status: | CLOSED FIXED | QA Contact: | Josef Moravec <josef.moravec> |
Severity: | minor | ||
Priority: | P5 - low | CC: | christian.stelzenmueller, fridolin.somers, gmcharlt, jonathan.druart, josef.moravec, martin.renvoize, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 20504: Fix lang attribute in html tag on systempreferences page
Bug 20504: Fix lang attribute in html tag on systempreferences page Bug 20504: Fix lang attribute in html tag on systempreferences page |
Description
Katrin Fischer
2018-03-31 07:19:39 UTC
*** Bug 19591 has been marked as a duplicate of this bug. *** The problem is that $lang is send to the template from preferences.pl and overwrites the normal $lang variable. I *think* the variable is not used/never properly set. Created attachment 77634 [details] [review] Bug 20504: Fix lang attribute in html tag on systempreferences page On the system preferences page the lang attribute of the html tag is always empty. To test: - Go to systempreferences - Check the html source and look at the html tag, it should read: <html lang=""> - Apply patch - Check the html source again: <html lang="en"> Verify the language code shown matches the currently selected language in the staff interface - Verify the language system preferences work correctly I am not totally sure about this one - it seems that the $lang variable in the preferences code was never set and not used in the template. But by overwriting the existing lang template variable, it broke the lang attribute in the html tag. Created attachment 77636 [details] [review] Bug 20504: Fix lang attribute in html tag on systempreferences page On the system preferences page the lang attribute of the html tag is always empty. To test: - Go to systempreferences - Check the html source and look at the html tag, it should read: <html lang=""> - Apply patch - Check the html source again: <html lang="en"> Verify the language code shown matches the currently selected language in the staff interface - Verify the language system preferences work correctly Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> The problem was actually that $lang = $template->param( 'lang' ); should certainly be $lang = $input->param( 'lang' ); and, as it, it overrides the value of 'lang' passed from C4::Auth Created attachment 78049 [details] [review] Bug 20504: Fix lang attribute in html tag on systempreferences page On the system preferences page the lang attribute of the html tag is always empty. To test: - Go to systempreferences - Check the html source and look at the html tag, it should read: <html lang=""> - Apply patch - Check the html source again: <html lang="en"> Verify the language code shown matches the currently selected language in the staff interface - Verify the language system preferences work correctly Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> The problem was actually that $lang = $template->param( 'lang' ); should certainly be $lang = $input->param( 'lang' ); and, as it, it overrides the value of 'lang' passed from C4::Auth Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Awesome work all! Pushed to master for 18.11 Pushed to 18.05.x for 18.05.03 Pushed to 17.11.x for 17.11.10 |