There are module-level variables in C4::Letters which cause problems with Plack installations. I haven't tracked down why, but there is also a db handle getting cached, resulting in: DBD::mysql::st execute failed: MySQL server has gone away at /home/jcamins/kohaclone/C4/Letters.pm line 546. at /home/jcamins/kohaclone/circ/circulation.pl line 747
I am upgrading this to blocker, since we have been advertising Plack-compatibility since 3.10. I understand some people are running Plack on the staff client in production. I would greatly appreciate it if those people would consider submitting a patch fixing this.
Hi Jared, Could you provide a way to reproduce the error please? Line numbers are changed and I don't know if I search at the right place :)
The location of the problem generating the state db handles was identified on bug 9138
Created attachment 18100 [details] [review] Bug 9452: C4::Letters not Plack-compatible Prior to this patch, at more-or-less random intervals pages working with notices will cease to function. To test: 1) Apply patch. 2) Try to edit some notices. 3) Trigger some notices. 4) If you were able to edit the notices and trigger the notices, sign off.
I do not have any technique for consistently reproducing these errors. 75% of the time notices are not generated and/or I am unable to save changes to notices.
Created attachment 18230 [details] [review] [PASSED QA] Bug 9452: C4::Letters not Plack-compatible Prior to this patch, at more-or-less random intervals pages working with notices will cease to function. To test: 1) Apply patch. 2) Try to edit some notices. 3) Trigger some notices. 4) If you were able to edit the notices and trigger the notices, sign off. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> All tests and QA script pass. I did a regression script without Plack: - edit, add, delete and copy notice - trigger checkout/checkin notice - print issueslip No problems found.
This patch has been pushed to master and 3.12.x.
This patch has made it difficult to create test cases where letter-table needs to be rapidly rebuilt. There is no way to invalidate the "our %letter" -cache, other than by calling %C4::Letters::letter = (); Which is quite hacky! This commit leads to VERY hard to debug problems! To fix this, the whole CRUD-mechanism for letter-handling needs to change.