An installer bug in Koha 17.05 and how it got fixed

Bugs in shipped version of s/w is as old as the history of computing. What matters is how fast and efficiently they are fixed. And that too by a loose-knit team of globally dispersed volunteers.

Earlier this afternoon, my senior colleague and fellow Koha aficianado Dr. Parthasarathi Mukhopadhyay aka PSM posted on FB about his experience with the latest stable release of Koha i.e. 17.05. Only yesterday Mirko Tietgen had released the debian packages of 17.05, and PSM was one of the early few in the country to get his hands dirty trying out the new version. In this case, his hands *did* become slightly dirty due to a bug in the newly re-vamped web installer of Koha. And thus PSM posted “With exciting new features and a serious bug“.

The web installer bug and what it does

There is a rather pesky bug in the web installer of Koha as shipped with 17.05. This bug is not present in Koha version 16.11.x or earlier. It will only manifest under two conditions: (1) when you are working with a fresh Koha 17.05 installation OR (2) when you are attempting to create a new Koha instance (using the sudo koha-create --create-db <instancename>) on a Koha installation upgraded from 16.11.x or earlier.

NOTE: The bug does not affect users who are simply upgrading their existing Koha instance to 17.05 from earlier versions e.g. say 16.05.x series.

What is bug does is that the optional data sets and some mandatory default data sets (sql files located in and under /usr/share/koha/intranet/cgi-bin/installer/data/mysql directory) do not get loaded into the Koha database being setup.

Image courtesy : Dr. P. Mukhapadhyay
Image courtesy : Dr. P. Mukhapadhyay

NOTE: Of course one can load them manually from the commandline, but that is not usually a pretty thing to do and the user needs to know what they are doing.

Long live the bugzilla

The bugzilla is the place where all Koha bugs are tracked and fixed. It is located at And on June 7, 2017 Julian Maurice, a Koha dev from BibLibre had reported the issue – “Web installer does not load default data” (Bug id 18741). Within 20 mins, Julian had also submitted the patch (i.e. the code to fix or remove the bug) to the bugzilla. Within 48 hours, Nick Clemens followed by the current Release Manager Jonathan Druart had signed off the patch (i.e. they tested and certified that Julian’s fix works as expected). Four minutes later Jonathan had also “pushed” the patch / fix in the current under development version. And 5 days later Fridolin Somers – the release maintainer for 17.05 series had “pushed” the patch into the current stable with the note that the next version 17.05.1 (to be released in another 10 – 12 days) will carry the fix as a publicly available built-in fix.


For the impatient

Now for some reason, you are one of the impatient types who can’t wait until 17.05.1 is released at the end of this month, you may be able to manually patch your system. I do not recommend it, and if you do what follows next, then one of the following applies to you:

  1. You are impatient
  2. You like to live dangerously
  3. You know what you are doing
  4. All of these

Open the file /usr/share/koha/intranet/cgi-bin/installer/ in a text editor and go to line number 248 which should read as “scalar $query->param('framework') );“. Replace this line with “$query->multi_param('framework') );“. Save and close the file.

Run the web-installer to setup your new Koha 17.05 instance. This time, things should be working OK. The screen that you will see after import of the all the mandatory and all the optional data sets (we chose it that way) will be like as given below.