Bug 9962 - updatedatabase.pl: Undefined subroutine &main::CheckVersion called at /home/koha/kohaclone/installer/data/mysql/updatedatabase.pl line 5342.
Summary: updatedatabase.pl: Undefined subroutine &main::CheckVersion called at /home/k...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (web-based installer) (show other bugs)
Version: 3.8
Hardware: PC Linux
: P2 major (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-01 10:48 UTC by Manos PETRIDIS
Modified: 2014-08-03 21:40 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
screencap #1 (25.05 KB, image/jpeg)
2013-04-06 19:59 UTC, Manos PETRIDIS
Details
screencap #2 (84.46 KB, image/jpeg)
2013-04-06 20:00 UTC, Manos PETRIDIS
Details
latest updates applied (74.71 KB, image/jpeg)
2013-04-06 20:01 UTC, Manos PETRIDIS
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Manos PETRIDIS 2013-04-01 10:48:17 UTC
Hi all,

I have been running Koha (development/git) on a Debian VM for some months now, with only a few problems so far. 
Tried recently to upgrade to version 3.08.11.002; when I access the Web installer however, I get the following error and cannot proceed further, as I’m constantly brought to the same point:
Web installer › Step 3
We are upgrading from Koha 3.08.11.001 to 3.08.11.002, you must update your database

Updating database structure
Update report :
•	Status: 500
•	Content-type: text/html
•	
•	<h1>Software error:</h1>
•	<pre>Undefined subroutine &amp;main::CheckVersion called at /home/koha/kohaclone/installer/data/mysql/updatedatabase.pl line 5342.
•	</pre>
•	<p>
•	For help, please send mail to the webmaster (<a href="mailto:webmaster@koha">webmaster@koha</a>), giving this error message
•	and the time and date of the error.
•	
•	</p>
Update errors :
•	[Sat Mar 30 17:23:15 2013] updatedatabase.pl: Undefined subroutine &main::CheckVersion called at /home/koha/kohaclone/installer/data/mysql/updatedatabase.pl line 5342.

Any clues, any suggestions? 
uname –a reports ver 2.6.32.5-686
git shortlog is quite long to fit into a message, so I defer posting unless someone asks for it.


Thank you in advance
Manos Petridis

PS Sent again, to the bugs list this time, as I fail to find my original posting in the March 2013 Koha Archives at http://lists.katipo.co.nz/pipermail/koha/2013-March/date.html 
nor at the custom search at http://www.google.com/cse?cx=003732456596742799141:4x-q-r-zypo&q=updatedatabase.pl%3A%20Undefined%20subroutine%20%26main%3A%3ACheckVersion%20called%20at%20%2Fhome%2Fkoha%2Fkohaclone%2Finstaller%2Fdata%2Fmysql%2Fupdatedatabase.pl%20line%205342&oq=updatedatabase.pl%3A%20Undefined%20subroutine%20%26main%3A%3ACheckVersion%20called%20at%20%2Fhome%2Fkoha%2Fkohaclone%2Finstaller%2Fdata%2Fmysql%2Fupdatedatabase.pl%20line%205342&gs_l=partner.12...262144.262144.0.262790.0.0.0.0.0.0.0.0..0.0.gsnos%2Cn%3D13..0.0.20j400j2..1ac.1.#gsc.tab=0&gsc.q=updatedatabase.pl%20petridis
Comment 1 Manos PETRIDIS 2013-04-06 19:59:39 UTC
Created attachment 17217 [details]
screencap #1
Comment 2 Manos PETRIDIS 2013-04-06 20:00:25 UTC
Created attachment 17218 [details]
screencap #2
Comment 3 Manos PETRIDIS 2013-04-06 20:01:51 UTC
Created attachment 17219 [details]
latest updates applied
Comment 4 Manos PETRIDIS 2013-04-06 20:12:17 UTC
Please note a notion to a similar error, at the end of bug #9382 discussion.
Comment 5 Derryn 2013-04-06 23:18:20 UTC
I don't currently have the means to check it myself, but I know how you can check and fix it yourself.

1. Open the updatedatabase.pl file for editing
2. Search for the following
<code>if ( CheckVersion($DBversion) ) {</code>
3. Replace with
<code>if (C4::Context->preference("Version") < TransformToNum($DBversion)) {</code>
4. Retry web-installer

Hope this helps
Comment 6 Derryn 2013-04-06 23:21:11 UTC
(In reply to comment #5)
> I don't currently have the means to check it myself, but I know how you can
> check and fix it yourself.
> 
> 1. Open the updatedatabase.pl file for editing
> 2. Search for the following
> <code>if ( CheckVersion($DBversion) ) {</code>
> 3. Replace with
> <code>if (C4::Context->preference("Version") < TransformToNum($DBversion))
> {</code>
> 4. Retry web-installer
> 
> Hope this helps

Without the <code></code> .. i thought bugzilla might be smart enough to recognition the tags and make it easier to read.
Comment 7 Manos PETRIDIS 2013-04-07 05:41:19 UTC
Thank you Derryn, it worked!
Comment 8 Chris Cormack 2013-04-07 07:45:48 UTC
The good news was, it was never actually released, but yep there was a cut and paste error in git, fixed now