@@ -, +, @@ framework - Go to Home > Administration > MARC frameworks - Add framework e.g. TEST, submit - In List of frameworks, go to framework TEST, Actions, MARC Structure - Create framework for... : Select DEFAULT - Apply patch - Verify that code changes make sense - Try to recreate error --- admin/marctagstructure.pl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) --- a/admin/marctagstructure.pl +++ a/admin/marctagstructure.pl @@ -342,6 +342,7 @@ sub StringSearch { # the sub used to duplicate a framework from an existing one in MARC parameters tables. # sub duplicate_framework { + my $cache = Koha::Cache->get_instance(); my ($newframeworkcode,$oldframeworkcode) = @_; my $dbh = C4::Context->dbh; my $sth = $dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from marc_tag_structure where frameworkcode=?"); @@ -356,10 +357,11 @@ sub duplicate_framework { $sth_insert = $dbh->prepare("insert into marc_subfield_structure (frameworkcode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,seealso,hidden) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); while ( my ($frameworkcode, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory, $kohafield, $tab, $authorised_value, $thesaurus_category, $value_builder, $seealso,$hidden) = $sth->fetchrow) { $sth_insert->execute($newframeworkcode, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory, $kohafield, $tab, $authorised_value, $thesaurus_category, $value_builder, $seealso, $hidden); - } - $cache->clear_from_cache("MarcStructure-0-$newframeworkcode"); - $cache->clear_from_cache("MarcStructure-1-$newframeworkcode"); - $cache->clear_from_cache("default_value_for_mod_marc-$frameworkcode"); - $cache->clear_from_cache("MarcSubfieldStructure-$frameworkcode"); + + $cache->clear_from_cache("MarcStructure-0-$newframeworkcode"); + $cache->clear_from_cache("MarcStructure-1-$newframeworkcode"); + $cache->clear_from_cache("default_value_for_mod_marc-$frameworkcode"); + $cache->clear_from_cache("MarcSubfieldStructure-$frameworkcode"); + } } --