<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-AU link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Oh… I’ve found something interesting!<br><br>lib/Koha/Patron.pm uses "checkPrevCheckout" instead of "CheckPrevCheckout", which is why I wasn’t finding it with my case-sensitive grep. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>In C4::Circulation::CanBookBeIssued, I think it is very likely that C4::Context->preference(“checkPrevCheckout”) is called and then the next call is C4::Context->preference("IndependentBranches"), and somehow… the value from “checkPrevCheckout” is being used instead of the true value of “IndepenentBranches”. Yikes!<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I don’t know how it’s happening, but it’s happening. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I notice that Plack runs Koha::Caches->flush_L1_caches() routinely. So does bin/migration_tools/rebuild_zebra.pl when it’s run in daemon_mode. I reckon a short-term solution would be to add that cache flushing to the SIP server as well. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>However, I’m still really curious how the wrong value is being returned by C4::Context->preference("IndependentBranches")…<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>David Cook<o:p></o:p></p><p class=MsoNormal>Systems Librarian<o:p></o:p></p><p class=MsoNormal>Prosentient Systems<o:p></o:p></p><p class=MsoNormal>72/330 Wattle St<o:p></o:p></p><p class=MsoNormal>Ultimo, NSW 2007<o:p></o:p></p><p class=MsoNormal>Australia<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Office: 02 9212 0899<o:p></o:p></p><p class=MsoNormal>Direct: 02 8005 0595<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> dcook@prosentient.com.au <dcook@prosentient.com.au> <br><b>Sent:</b> Monday, 2 September 2019 3:49 PM<br><b>To:</b> 'koha-devel' <koha-devel@lists.koha-community.org><br><b>Subject:</b> IndependentBranches == "softno" on SIP server<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hi all,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’ve been getting errors on a SIP server that indicate that “IndependentBranches” is non-zero. However, both MySQL and Memcached have said that “IndependentBranches” is zero. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>So I added some logging to the SIP server, and it’s saying that the value of “IndependentBranches” – at the time of the error – is “softno”. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>So I looked through the Koha code and the only reference to “softno” I can find is in regards to “CheckPrevCheckout”.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’ve checked environmental variables and every bit of code I can think of, and I’m absolutely stumped by this one.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The most feasible answer to me is a caching problem. However, it happened over the course of weeks, and it always had the same value, so that seems a bit far-fetched too.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I suppose the next step is to add yet more logging, but I figured I’d reach out to all of you to see if anyone has had a similar problem. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>David Cook<o:p></o:p></p><p class=MsoNormal>Systems Librarian<o:p></o:p></p><p class=MsoNormal>Prosentient Systems<o:p></o:p></p><p class=MsoNormal>72/330 Wattle St<o:p></o:p></p><p class=MsoNormal>Ultimo, NSW 2007<o:p></o:p></p><p class=MsoNormal>Australia<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Office: 02 9212 0899<o:p></o:p></p><p class=MsoNormal>Direct: 02 8005 0595<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>