Bug 16094 - error editing (borrowers, reports) with mysql enterprise
Summary: error editing (borrowers, reports) with mysql enterprise
Status: RESOLVED DUPLICATE of bug 17257
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: unspecified
Hardware: All All
: P1 - high normal (vote)
Assignee: Bugs List
QA Contact: Testopia
Depends on:
Blocks: 17258
  Show dependency treegraph
Reported: 2016-03-17 17:43 UTC by Humberto Blanco
Modified: 2016-09-06 09:50 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:


Note You need to log in before you can comment on or make changes to this bug.
Description Humberto Blanco 2016-03-17 17:43:33 UTC

when i try to modify an user get this error

DBIx::Class::Storage::DBI::_dbh_execute(): Incorrect integer value: '' for column 'guarantorid' at row 1 at /usr/share/koha/lib/C4/Members.pm line 665

i review the sorce code 

<label for="contactname">Nombre de la institución: </label>
 [% IF ( guarantorid ) %]
 <span>[% contactname %]</span>
 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
 [% ELSE %]
 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
 [% END %]

but when do not exist guarantor, how can i apply 0 (i think)? 

thansk for your help.
Comment 1 Jonathan Druart 2016-03-21 15:41:26 UTC
I don't understand, are you trying to edit a patron using the Koha interface or the mysql cli?
If you want to insert/update a patron using the mysql cli, you need to specify guarantorid=NULL
Comment 2 Humberto Blanco 2016-03-28 15:23:08 UTC
Hi Jonathan, 
This errors happend using the Koha interface, occurs when we are testing the koha database in mysql enterprise. Nothing happend in mysql community version.
Comment 3 Jonathan Druart 2016-03-29 07:44:24 UTC
Try disabling STRICT_TRANS_TABLES in your MySQL config file.
Comment 4 Humberto Blanco 2016-03-31 20:27:39 UTC
disabling those parameters do not work. Now the variable name sql_mode is empty but the error is the same.

I modify the database structure for some of those errors,   from example in addorder.pl when creating appear the following error:
DBIx::Class::Storage::DBI::_dbh_execute(): Field "budget_group_id" doesn´t have a default value at /usr/share/koha/lib/....

In mysql community i dont have those error but yes in enterprise.then i modify the database structure.

ALTER TABLE aqorders ALTER COLUMN budgetgroup_id  SET DEFAULT 0;

I believe that is needle put this in the update database scripts.

Best regards!
Comment 5 Jonathan Druart 2016-09-06 09:50:20 UTC

*** This bug has been marked as a duplicate of bug 17257 ***