Bug 23353 - ACQ framework makes fr-CA web installer explode
Summary: ACQ framework makes fr-CA web installer explode
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (web-based installer) (show other bugs)
Version: 19.05
Hardware: All Linux
: P5 - low major
Assignee: Caroline Cyr La Rose
QA Contact: Tomás Cohen Arazi (tcohen)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-22 03:28 UTC by Mathben
Modified: 2020-06-04 20:34 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.04
Circulation function:


Attachments
Bug 23353: ACQ framework makes fr-CA web installer explode (10.93 KB, patch)
2019-08-16 19:07 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 23353: ACQ framework makes fr-CA web installer explode (11.00 KB, patch)
2019-09-06 10:28 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 23353: ACQ framework makes fr-CA web installer explode (11.05 KB, patch)
2019-09-06 18:24 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mathben 2019-07-22 03:28:37 UTC
I installed a fresh installation, Koha 19.05, with following this guide with Debian Stretch : https://wiki.koha-community.org/wiki/Debian

Into my intra site, I use the web interface to configure the database. I use the default values and I get this error : 
"
marc21_sample_acq_framework.sql

[Mon Jul 22 03:04:19 2019] install.pl: DBD::mysql::st execute failed: Duplicate entry 'ACQ-020' for key 'PRIMARY' at /usr/share/perl5/DBIx/RunSQL.pm line 273.
"

The other SQL seems correctly installed.

I used the translate fr-CA.
I found the path of the SQL files : /usr/share/koha/intranet/cgi-bin/installer/data/mysql/fr-CA/marcflavour/marc21/obligatoire/marc21_sample_acq_framework.sql

When I continue the installation, I got this error from url "cgi-bin/koha/installer/onboarding.pl" :
"
Template process failed: file error - /usr/share/koha/intranet/htdocs/intranet-tmpl/prog/fr-CA/modules/onboarding/onboardingstep1.tt: not found at /usr/share/koha/lib/C4/Templates.pm line 122.
"
Comment 1 Tomás Cohen Arazi (tcohen) 2019-08-14 18:17:51 UTC
I cannot reproduce this bug. What I did:

- Run:
  $ mkdir test_koha
  $ vagrant init debian/stretch64
  $ vim Vagrantfile
<uncommented the private_network thing>
  $ vagrant up
  $ vagrant ssh
  $ wget -q -O- https://debian.koha-community.org/koha/gpg.asc | sudo apt-key add -
  $ echo 'deb http://debian.koha-community.org/koha 19.05 main' | sudo tee /etc/apt/sources.list.d/koha.list

  $ sudo apt update ; sudo apt install mysq-server koha-common
  $ sudo a2enmod rewrite
  $ sudo a2enmod cgi
  $ sudo systemctl restart apache2
  $ sudo koha-create --create-db test
  $ sudo a2enmod headers proxy_http
  $ sudo systemctl restart apache2
  $ sudo koha-plack --enable test
  $ sudo koah-plack --start test
  $ sudo koha-passwd test
<copied the displayed password>
- Tweaked my /etc/hosts adding
192.168.33.10   test-intra.myDNSname.org test.myDNSname.org
- Pointed my browser to: http://test-intra.myDNSname.org
- Used the instance credentials: koha_test / <the copied password>
- Followed the steps, chose all the sample data
=> SUCCESS: No failures at all.
Comment 2 Tomás Cohen Arazi (tcohen) 2019-08-14 18:25:25 UTC
I noticed this was about the fr-CA translation, and my tests fail on the very first step saying:

Template process failed: file error - /usr/share/koha/intranet/htdocs/intranet-tmpl/prog/fr-CA/modules/installer/step1.tt

So, this is about the fr-CA translations!
Comment 3 Katrin Fischer 2019-08-15 19:52:36 UTC
I have taken a look: 

http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=installer/data/mysql/fr-CA/marcflavour/marc21/obligatoire/marc21_sample_acq_framework.sql;h=f5131375d8d515508167a293fc8ca0f937e25bf0;hb=f9572dd1acd9f39229d8cd864050a536b9c2815d

First it adds a copy of the default framework as the new ACQ framework with the first 3 INSERTS. Then the 4th tries to add a subset of the fields *again* which makes things explode.

I didn't dare to just remove the one or the other set of INSERTS, because:

- If you remove 4th and 5th the generated framework you have way too many fields visible if you decide to use the bibliographic part of it in ACQ (UseACQFrameworkForBiblioRecords)

- If you remove the 2nd and 3rd, then you end up without 952

It appears that other installers don't have an ACQ framwork, at least I didn't spot one in en and de-DE.

As a workaround for now: uncheck the ACQ framework from installing when you run the onboarding/web installer.

Downgrading a bit, since the problem is limited and there is a workaoround.
Comment 4 Katrin Fischer 2019-08-15 19:55:40 UTC
Looks like it was this commit:
http://git.koha-community.org/gitweb/?p=koha.git;a=commit;h=ad2b04001fe3100a5caeafbbdd5ea56a6ff65e1a
Comment 5 Katrin Fischer 2019-08-15 20:03:08 UTC
Another note: 3 fr-CA files were amended - we only want one file to add the ACQ  framework, not 3 :)
Comment 6 Katrin Fischer 2019-08-15 20:22:36 UTC
(In reply to Katrin Fischer from comment #5)
> Another note: 3 fr-CA files were amended - we only want one file to add the
> ACQ  framework, not 3 :)

Dismiss this comment, got confused by fr-FR and fr-CA and marcflavours.
Comment 7 Caroline Cyr La Rose 2019-08-15 20:30:02 UTC
I will clean up the sql files for fr-CA
Comment 8 Caroline Cyr La Rose 2019-08-16 19:07:46 UTC
Created attachment 92297 [details] [review]
Bug 23353: ACQ framework makes fr-CA web installer explode

This patch removes the standalone ACQ framework SQL file in the fr-CA
directory and adds the ACQ framework creation SQL in the default
framework file, as it is in other languages.
Comment 9 Kyle M Hall (khall) 2019-09-06 10:28:45 UTC
Created attachment 92625 [details] [review]
Bug 23353: ACQ framework makes fr-CA web installer explode

This patch removes the standalone ACQ framework SQL file in the fr-CA
directory and adds the ACQ framework creation SQL in the default
framework file, as it is in other languages.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 10 Tomás Cohen Arazi (tcohen) 2019-09-06 18:24:58 UTC
Created attachment 92653 [details] [review]
Bug 23353: ACQ framework makes fr-CA web installer explode

This patch removes the standalone ACQ framework SQL file in the fr-CA
directory and adds the ACQ framework creation SQL in the default
framework file, as it is in other languages.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 11 Martin Renvoize (ashimema) 2019-09-09 10:16:57 UTC
Nice work!

Pushed to master for 19.11.00
Comment 12 Fridolin Somers 2019-09-13 12:34:34 UTC
Pushed to 19.05.x for 19.05.04
Comment 13 Lucas Gass (lukeg) 2019-10-17 18:50:37 UTC
backported to 18.11.x for 18.11.11