Bug 5611

Summary: can't add comments and tags in the OPAC when mod_perl is activated
Product: Koha Reporter: Brice Sanchez <brice.sanchez>
Component: OPACAssignee: Brice Sanchez <brice.sanchez>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: blocker    
Priority: PATCH-Sent (DO NOT USE) CC: chris, colin.campbell, julian.maurice
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: patch for C4::Scrubber.pm

Description Brice Sanchez 2011-01-12 14:03:40 UTC
Created attachment 2979 [details] [review]
patch for C4::Scrubber.pm

Our Koha 3.2.2 is connected to the community Git and we are using mod_perl (in the OPAC only - amazing performances ^^).

We aren't able to add comments or tags  in the page : .../cgi-bin/koha/opac-detail.pl?biblionumber=XXX

When we submit a tag or a comment, firebug return : 

<h1>Software error:</h1>
<pre>New called with unrecognized type 'default' at /home/koha/kohagit/opac/opac-tags.pl line 131
</pre>
<p>
For help, please send mail to the webmaster (<a href="mailto:sysadmins@sys-tech.net">sysadmins@sys-tech.net</a>), giving this error message 
and the time and date of the error.
</p>


After verification, we saw that C4::Scrubber.pm is the problem...

See the patch to understand our modification.
Comment 1 Colin Campbell 2011-01-12 16:18:08 UTC
Cause of the problem is that mod_perl executes one global INIT block on start up so the individual INITs like this are not used. There was no reason to use one here in the first place. Will add a commit message to Bryce's change in signoff and send a supplementary to tidy up the unused package variables.
Comment 2 Colin Campbell 2011-01-12 16:56:00 UTC
Signed off patch and sent supplemental clean up and test
Comment 3 Chris Cormack 2011-01-12 17:54:31 UTC
Pushed, please test
Comment 4 MJ Ray (software.coop) 2011-02-01 09:20:27 UTC
This bug is mentioned in:
Bug 5611 INIT block causes failure	with mod perl http://lists.koha-community.org/pipermail/koha-patches/2011-January/013588.html
Bug 5611 Tidy up C4::Scrubber http://lists.koha-community.org/pipermail/koha-patches/2011-January/013589.html