Bug 5611 - can't add comments and tags in the OPAC when mod_perl is activated
Summary: can't add comments and tags in the OPAC when mod_perl is activated
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: PATCH-Sent (DO NOT USE) blocker (vote)
Assignee: Brice Sanchez
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-12 14:03 UTC by Brice Sanchez
Modified: 2019-06-27 09:24 UTC (History)
3 users (show)

See Also:
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 (804 bytes, patch)
2011-01-12 14:03 UTC, Brice Sanchez
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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