[Bug 28281] New: Installer doesn't work on some languages (pl-PL) because it double decodes installer data
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 Bug ID: 28281 Summary: Installer doesn't work on some languages (pl-PL) because it double decodes installer data Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Installation and upgrade (web-based installer) Assignee: koha-bugs@lists.koha-community.org Reporter: joonas.kylmala@helsinki.fi QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Blocks: 27623 If trying to install Koha with pl-PL language it doesn't work due to double encoding error in C4/Installer.pm: $ koha-mysql kohadev < installer/data/mysql/kohastructure.sql $ restart_all $ ./translate update pl-PL $ ./translate install pl-PL $ restart_all --> Go to installer page and select pl-PL as installer language, click through it and notice it gives error:
Cannot decode string with wide characters at /usr/lib/x86_64-linux-gnu/perl/5.24/Encode.pm line 202
In installer the output of two calls YAML::XS::LoadFile is still decoded another time even though according to YAML::XS documentation the call to Load already decodes it. This causes the above error to happen in the MARC21 installation step. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27623 [Bug 27623] Remove pl-PL installer data -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |joonas.kylmala@helsinki.fi |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com Status|NEW |ASSIGNED Depends on| |22824 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Caused by bug 22824 I assume. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22824 [Bug 22824] Replace YAML::Syck with YAML::XS -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28154 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net --- Comment #2 from Victor Grousset/tuxayo <victor@tuxayo.net> --- hi :) Can't reproduce. Any hint ? I retried in case I did something different when testing bug 27623 The only thing I "improvised" was before the 1st step: echo "DROP DATABASE koha_kohadev; CREATE DATABASE koha_kohadev;" | koha-mysql kohadev ; restart_all Which is necessary right? What is the use of translate update in this case? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_21_05_candidate --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Victor Grousset/tuxayo from comment #2)
What is the use of translate update in this case?
The encoding issue is coming from there. Joonas, any news on this? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 --- Comment #4 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 120484 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120484&action=edit Bug 28281: Remove double decoding when importing installation data The YAML::XS::Load and YAML::XS::LoadFile functions already decode the YAML to Perl objects/strings, therefore decoding the output yet another time is not needed and causes an error to happen. To test: 1. Go through the following steps and notice without this patch the error happens and with this patch it doesn't: $ koha-mysql kohadev < installer/data/mysql/kohastructure.sql $ restart_all $ ./translate update pl-PL $ ./translate install pl-PL $ restart_all --> Go to the Koha web installer page and select pl-PL as the installer language, click through it and notice it gives following error at the MARC21 step: Cannot decode string with wide characters at /usr/lib/x86_64-linux-gnu/perl/5.24/Encode.pm line 202 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 --- Comment #5 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Jonathan Druart from comment #3)
(In reply to Victor Grousset/tuxayo from comment #2)
What is the use of translate update in this case?
The encoding issue is coming from there.
Joonas, any news on this?
I have the fix only, attached it now but no tests yet. I'd gladly welcome help there or if you can wait probably will be able to make it in the coming days. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 --- Comment #6 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Victor Grousset/tuxayo from comment #2)
Can't reproduce. Any hint ? I retried in case I did something different when testing bug 27623
No idea why you don't get it. Maybe for some reason you are using some other translation files compared to me? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 120486 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120486&action=edit Bug 28281: Add tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120484|0 |1 is obsolete| | Attachment #120486|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 120626 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120626&action=edit Bug 28281: Remove double decoding when importing installation data The YAML::XS::Load and YAML::XS::LoadFile functions already decode the YAML to Perl objects/strings, therefore decoding the output yet another time is not needed and causes an error to happen. To test: 1. Go through the following steps and notice without this patch the error happens and with this patch it doesn't: $ koha-mysql kohadev < installer/data/mysql/kohastructure.sql $ restart_all $ ./translate update pl-PL $ ./translate install pl-PL $ restart_all --> Go to the Koha web installer page and select pl-PL as the installer language, click through it and notice it gives following error at the MARC21 step: Cannot decode string with wide characters at /usr/lib/x86_64-linux-gnu/perl/5.24/Encode.pm line 202 Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 120627 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120627&action=edit Bug 28281: Add tests Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 --- Comment #10 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Nick, in case you are QA'ing this right now please check out also the bug 28291. Depending which translation data you have already you might need it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 --- Comment #11 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Joonas Kylmälä from comment #10)
Nick, in case you are QA'ing this right now please check out also the bug 28291. Depending which translation data you have already you might need it.
Err, meant to say Kyle. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120626|0 |1 is obsolete| | Attachment #120627|0 |1 is obsolete| | --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 120678 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120678&action=edit Bug 28281: Remove double decoding when importing installation data The YAML::XS::Load and YAML::XS::LoadFile functions already decode the YAML to Perl objects/strings, therefore decoding the output yet another time is not needed and causes an error to happen. To test: 1. Go through the following steps and notice without this patch the error happens and with this patch it doesn't: $ koha-mysql kohadev < installer/data/mysql/kohastructure.sql $ restart_all $ ./translate update pl-PL $ ./translate install pl-PL $ restart_all --> Go to the Koha web installer page and select pl-PL as the installer language, click through it and notice it gives following error at the MARC21 step: Cannot decode string with wide characters at /usr/lib/x86_64-linux-gnu/perl/5.24/Encode.pm line 202 Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 120679 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120679&action=edit Bug 28281: Add tests Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 --- Comment #14 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_21_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28281 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #15 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 22824 not in 20.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org