Summary: | Encoding problem under Plack | ||
---|---|---|---|
Product: | Koha | Reporter: | Paul Poulain <paul.poulain> |
Component: | Staff interface | Assignee: | Bugs List <koha-bugs> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | P1 - high | CC: | chris, dpavlin, gmcharlt, mtj |
Version: | 3.8 | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 8866 | ||
Attachments: |
encoding is wrong
Bug 8379 don't close dbh Bug 8379 removing another useless ->disconnect line Bug 8379 removing another useless ->disconnect line Bug 8379 don't close dbh Bug 8379 don't close dbh |
Reloading plack shouldn't make a difference, but I'm wondering did you made Z39.50 search before encoding got confused? Or anything which touches C libraries? We are doing way too much encoding magic as seen in Bug 6554 - added session CGI queries and all ZebraPAR utf8_decode I would love to have reproducible problem, so we can track it down. (In reply to comment #1) > Reloading plack shouldn't make a difference, but I'm wondering did you made > Z39.50 search before encoding got confused? Or anything which touches C > libraries? I don't remember. I just tried to reproduce the error by searching z3950, playing with addbiblio again, and could not reproduce the issue :( I'll add a comment if I have the problem again. I got the problem twice today. There was something common to both problems : I was playing with cataloguing framework. The 1st time I created a framework by duplicating a default one, then tried to edit item subfields The 2nd time, I was just editing item (995 for UNIMARC) for default framework (to test bug 8524) Maybe that's a step that should be investigated... Additionnal comment : plack logs says: DBD::mysql::db selectall_arrayref failed: MySQL server has gone away at /home/paul/koha.dev/koha-community/C4/VirtualShelves.pm line 210. When it becomes broken. And my changes in the framework aren't visible plack is restarted. Maybe that's related to caching ? OK, i've found where the problem comes from = $dbh connection is closed by marc_subfield_structure.pl, and that's where the problem comes from. attaching a patch that fixes the problem. Created attachment 12488 [details] [review] Bug 8379 don't close dbh don't close the DBH handler, because under plack this cause a lot of problem and in CGI mode, closing the dbh handler is useless OK, i've found where the problem comes from = $dbh connection is closed by marc_subfield_structure.pl, and that's where the problem comes from. attaching a patch that fixes the problem. how to test: * define a library and/or an itemtype with a diacritic in the name * before the patch = if you search/edit a marc subfield structure, you'll get diacritic badly broken. and a "mysql has gone away" in plack logs * after the patch = no more problem Created attachment 12489 [details] [review] Bug 8379 removing another useless ->disconnect line and s/tab/spaces/ I've grepped for disconnect, and found another one. There's no more, except in some misc/cronjob scripts. Plack is not concerned by those, so no need to fix anything Created attachment 12495 [details] [review] Bug 8379 removing another useless ->disconnect line and s/tab/spaces/ Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org> Created attachment 12496 [details] [review] Bug 8379 don't close dbh don't close the DBH handler, because under plack this cause a lot of problem and in CGI mode, closing the dbh handler is useless This is great news, good work Paul! I attached signed-off patches in reverse order, but it shouldn't matter because they are independent. Created attachment 12497 [details] [review] Bug 8379 don't close dbh don't close the DBH handler, because under plack this cause a lot of problem and in CGI mode, closing the dbh handler is useless Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org> > Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org> passing QA on 2 patches, good spotting! $ koha-qa.pl -c 2 testing 2 commit(s) (applied to commit 0a35b26) * 268f89b Bug 8379 don't close dbh admin/marc_subfields_structure.pl * fcc89e7 Bug 8379 removing another useless ->disconnect line admin/z3950servers.pl * admin/marc_subfields_structure.pl OK * admin/z3950servers.pl OK mason@xen1:~/g/head$ Patch pushed to master Pushed to 3.8.x, will be in 3.8.6 |
Created attachment 10670 [details] encoding is wrong Playing with Plack on staff interface, I just got an encoding problem (see attachment). It's the 1st time I saw this problem, I stopped & restarted plack, and it worked again smoothly. No idea why/what make this happen... Note = I applied/pushed some patches witout restarting plack, I don't think it's related, but just in case...