[Koha-bugs] [Bug 23309] Can't add new subfields to bibliographic frameworks in strict mode

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Sep 19 13:53:05 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23309

Corinne Hayet <corinne.hayet at progilone.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |corinne.hayet at progilone.fr

--- Comment #18 from Corinne Hayet <corinne.hayet at progilone.fr> ---
Hello everybody,

We apply the last commit on Koha 18.11 including this patch and it doesn't
work.

We've got two errors

 1. A foreign key constraint on authorised_value that fires because the value
"" is passed instead of NULL:

DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key
constraint fails (`koha`.`marc_subfield_structure`, CONSTRAINT
`marc_subfield_structure_ibfk_1` FOREIGN KEY (`authorised_value`) REFERENCES
`authorised_value_categories` (`category_name`) ON DELETE SET NULL ON ) [for
Statement "
        update marc_subfield_structure set tagfield=?, tagsubfield=?,
liblibrarian=?, libopac=?, repeatable=?, mandatory=?, kohafield=?, tab=?,
seealso=?, authorised_value=?, authtypecode=?, value_builder=?, hidden=?,
isurl=?, frameworkcode=?,  link=?, defaultvalue=?, maxlength=?
        where tagfield=? and tagsubfield=? and frameworkcode=?
    " with ParamValues: 0="225", 1="a", 2="titre de la collection", 3="", 4=0,
5=0, 6="biblioitems.collectiontitle", 7="0", 8=undef, 9="", 10="",
11="unimarc_field_225a.pl", 12="0", 13=0, 14="FA", 15="", 16="", 17="9999",
18="225", 19="a", 20="FA"] at
/usr/share/koha/intranet/cgi-bin/admin/marc_subfields_structure.pl line 276.


2. The hidden field is explicitly set to null, so it does not change to its
default value:

DBD::mysql::st execute failed: Column 'hidden' cannot be null [for Statement
"INSERT INTO `marc_subfield_structure` ( `authorised_value`, `authtypecode`,
`defaultvalue`, `frameworkcode`, `hidden`, `isurl`, `kohafield`,
`liblibrarian`, `libopac`, `link`, `mandatory`, `maxlength`, `repeatable`,
`seealso`, `tab`, `tagfield`, `tagsubfield`, `value_builder`) VALUES ( ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" with ParamValues: 0="", 1="",
2="", 3="FA", 4=undef, 5=0, 6='', 7="test", 8="test", 9="", 10=0, 11="9999",
12=0, 13=undef, 14="-1", 15="225", 16="z", 17=""] at
/usr/local/share/perl5/DBIx/Class/Storage/DBI.pm line 1836.

Best regards,

Corinne

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list