(Checked the Wiki, tried chat, and searched bugs before reporting.)
I tried to log in as a user and got:
Template process failed: undef error - DBIx::Class::Storage::DBI::_dbh_execute(): Table 'koha_library.club_enrollments' doesn't exist at /usr/share/koha/lib/Koha/Objects.pm line 260
For help, please send mail to the webmaster ([no address given]), giving this error message and the time and date of the error.
The VirtualHost below is the only one listening on its special port:
<IfVersion >= 2.4>
Define instance "library"
# Include /etc/koha/apache-shared-disable.conf
# Include /etc/koha/apache-shared-opac-plack.conf
SetEnv KOHA_CONF "/etc/koha/sites/library/koha-conf.xml"
AssignUserID library-koha library-koha
# TransferLog /var/log/koha/library/opac-access.log
# RewriteLog /var/log/koha/library/opac-rewrite.log
What can I do to either create missing tables like koha_libary.club_enrollments, or mark them as not needed for the patron screen to do its work?
Did you have any errors running the web installer?
I don't remember seeing errors. Would it make sense to wipe the installation and re-run the installer, and if so, how can I do that?
You could create and try with another instance - this might be the easiest and you might be able to compare the 2 databases.
Thank you; I tried and ran into an error. Ducked into chat, and they said a bugfix that might address my current difficulty is slated for announcement in the next few days.
I know ;)
I was thinking of bug 18741 - it might be a fix, but I am not sure. Maybe someone else could run a test?
We just got a report of a successful Koha installation in Ubuntu with 17.05. Made me wonder - which DBMS are you using? MySQL?
I'm using MySQL on a Mint 18.1 VM running under VirtualBox on a Mac.
Would it make sense to erase all traces of Koha installations and reinstall from scratch?
If so, what do I need to do so Koha sees a clean slate?
linux-tools monasterylibrary # mysql --version
mysql Ver 14.14 Distrib 5.7.18, for Linux (x86_64) using EditLine wrapper
Ok, first thing: Don't use Mysql 5.7 - it won't work well with Koha, there are known problems with it. It's recommended to use MariaDB instead.
(In reply to C.J.S. Hayward from comment #7)
> I'm using MySQL on a Mint 18.1 VM running under VirtualBox on a Mac.
> Would it make sense to erase all traces of Koha installations and
> reinstall from scratch?
No, it makes more sense to restart the VirtualBox image from scratch. Clean is important.
I successfully installed Koha 17.05 on Linux Mint 18 (I used https://linuxmint.com/edition.php?id=217).
I generally followed:
I have updated the instructions to highlight the community's preference for MariaDB.
Your use of specialized port suggests that you should read https://wiki.koha-community.org/wiki/Koha_on_ubuntu_-_packages#Appendix_A:_Named-based_vs._IP-based_installations
My test was a Name Based installation, as does following the dotted blue boxes (at least they are on my screen).
DISCLAIMER: I make no claims about overall functionality, nor do I recommend the use of Linux Mint. Debian has the ability to add a Desktop. It makes no sense to me using Linux Mint, when you could choose GNOME, XFCE, or a couple others as part of the Debian installation.
Any problems you are encountering are likely related to https://wiki.koha-community.org/wiki/Koha_on_ubuntu_-_packages#Ubuntu_16.04_and_MySQL_5.7
Particularly, the second option without the MySQL configuration tweak.
(In reply to C.J.S. Hayward from comment #0)
> Template process failed: undef error -
> DBIx::Class::Storage::DBI::_dbh_execute(): Table
> 'koha_library.club_enrollments' doesn't exist at
> /usr/share/koha/lib/Koha/Objects.pm line 260
The problem is that the table 'koha_library.club_enrollments' does not exist. This is because MySQL 5.7 does not like the default value given to the "date_created" column:
mysql> CREATE TABLE IF NOT EXISTS club_enrollments (
-> id int(11) NOT NULL AUTO_INCREMENT,
-> club_id int(11) NOT NULL,
-> borrowernumber int(11) NOT NULL,
-> date_enrolled timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
-> date_canceled timestamp NULL DEFAULT NULL,
-> date_created timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
-> date_updated timestamp NULL DEFAULT NULL,
-> branchcode varchar(10) NULL DEFAULT NULL,
-> PRIMARY KEY (id),
-> KEY club_id (club_id),
-> KEY borrowernumber (borrowernumber),
-> KEY branchcode (branchcode),
-> CONSTRAINT club_enrollments_ibfk_1 FOREIGN KEY (club_id) REFERENCES clubs (id) ON DELETE CASCADE ON UPDATE CASCADE,
-> CONSTRAINT club_enrollments_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE,
-> CONSTRAINT club_enrollments_ibfk_3 FOREIGN KEY (branchcode) REFERENCES branches (branchcode) ON DELETE SET NULL ON UPDATE CASCADE
-> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ERROR 1067 (42000): Invalid default value for 'date_created'
MySQL 5.5 does not have any problems with the default value.
Thank you. How do things stand after migrating the VM to use MariaDB?
I ran into the same problem after updating Koha. what could be the possible solution?
Hi Freddy, same question to you: Are you running MySQL 5.7 by chance?
I am using ubuntu 16.04
The problem seems to be related to setting of sql-mode in /etc/mysql/mariadb.conf.d/50-server.cnf
If anyone can confirm after changing sql-mode to other value like '' will allow clubenrollments to be created.
Also somewhere from the net mentioned "SET SESSION sql_mode = '';" will help.
Will be fixed by bug 20144
*** This bug has been marked as a duplicate of bug 20144 ***