Error importing templates marc 21 in koha. "DBIx :: Class :: Storage :: DBI :: _ dbh_execute (): Data truncated for column 'type'"

2

I'm trying to install koha. When I have it installed, and I enter the browser, I get the following error:

  

DBIx :: Class :: Storage :: DBI :: _ dbh_execute (): Data truncated for column 'type' at row 1 at /usr/share/koha/lib/Koha/Objects.pm line 101

     

For help, please send mail to the webmaster ([no address given]), giving this error message and the time and date of the error.

    
asked by Silverant 31.10.2016 в 12:59
source

2 answers

0

The error message indicates that the data of some of the column have been truncated (cut) by imperative of the type indicated for that column.

It's something like trying to save a value of millions within a column that supports numbers of only 4 digits.

It is very possible that the error is due to a version discrepancy between the Koha installed and the templates.

    
answered by 01.11.2016 в 09:54
0

The same error occurred to me. Apparently the error occurs in a column of type enum in the database. For MySQL you can solve it in the following way (within the MySQL database administrator):

SET GLOBAL sql_mode='';

By setting the mode with an empty string '' you are telling MySQL not to take into account some errors that arise when inserting data.

MySQL can operate in different modes, some modes are more restrictive than others, for example some modes do not allow certain operations, such as division between zero or restrict the way in which dates are represented in the database.

To see the way the server is located, you must log in to MySQL from the command line:

mysql -u usuario -p

If the MySQL server does not have a password (which is not recommended) I omitted the -p parameter. You can then consult the mode with the following command

SELECT @@GLOBAL.sql_mode

It will give you an exit more or less similar to this:

STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION

You can find more information in this link link

    
answered by 11.11.2016 в 01:34