Bugzilla – Attachment 53815 Details for
Bug 16955
Internal Server Error while populating new framework
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16955: Internal Server Error while populating new framework
Bug-16955-Internal-Server-Error-while-populating-n.patch (text/plain), 2.80 KB, created by
Josef Moravec
on 2016-07-30 09:01:40 UTC
(
hide
)
Description:
Bug 16955: Internal Server Error while populating new framework
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2016-07-30 09:01:40 UTC
Size:
2.80 KB
patch
obsolete
>From 7af529fcd0eef8e73616749b23ea17b89a269b05 Mon Sep 17 00:00:00 2001 >From: Marc <veron@veron.ch> >Date: Thu, 21 Jul 2016 21:31:04 +0200 >Subject: [PATCH] Bug 16955: Internal Server Error while populating new > framework > >While populating a new framework, an internal server error occurs. >(Error occurs with plack enabled) > >Steps to reproduce: > >- 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 >Result: Internal Server Error (rest of screen blank) > >This patch fixes a variable scope issue and moves 4 lines >that should be inside a loop. > >To test: >- Apply patch >- Verify that code changes make sense >- Try to recreate error > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > admin/marctagstructure.pl | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > >diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl >index 27d9592..0f05384 100755 >--- a/admin/marctagstructure.pl >+++ b/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"); >+ } > } > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16955
:
53612
|
53815
|
53874
|
54086
|
54387