Bugzilla – Attachment 137460 Details for
Bug 31054
Manual importing for EDIFACT invoices fails with a 500 error page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31054: Manual importing for EDIFACT invoices fails with a 500 error page
Bug-31054-Manual-importing-for-EDIFACT-invoices-fa.patch (text/plain), 1.71 KB, created by
Martin Renvoize (ashimema)
on 2022-07-11 06:32:35 UTC
(
hide
)
Description:
Bug 31054: Manual importing for EDIFACT invoices fails with a 500 error page
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-07-11 06:32:35 UTC
Size:
1.71 KB
patch
obsolete
>From 27c7acc79903b1757591f9447cfbe6464d3afb7a Mon Sep 17 00:00:00 2001 >From: Kyle Hall <kyle@bywatersolutions.com> >Date: Mon, 27 Jun 2022 08:13:39 -0400 >Subject: [PATCH] Bug 31054: Manual importing for EDIFACT invoices fails with a > 500 error page > >Error in plack log is: Can't locate object method "new" via package >"Koha::Plugin::Com::ByWaterSolutions::MyEdifactPlugin" (perhaps you >forgot to load "Koha::Plugin::Com::ByWaterSolutions::MyEdifactPlugin"?) >at /usr/share/koha/lib/Koha/EDI.pm line 219. > >Test Plan: >1) Set EdifactInvoiceImport to "Don't" >2) Configure an EDI vendor to use an EDIFACT plugin >3) Attempt to import an invoice file >4) You will be shown an error page >5) Apply this patch >6) Restart all the things! >7) Attempt to import another invoice file >8) It works! > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/EDI.pm | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/Koha/EDI.pm b/Koha/EDI.pm >index 43ea19cb84..4778a1d7f7 100644 >--- a/Koha/EDI.pm >+++ b/Koha/EDI.pm >@@ -41,6 +41,7 @@ use Koha::Edifact; > use C4::Log qw( logaction ); > use Log::Log4perl; > use Text::Unidecode qw( unidecode ); >+use Koha::Plugins; # Adds plugin dirs to @INC > use Koha::Plugins::Handler; > use Koha::Acquisition::Baskets; > use Koha::Acquisition::Booksellers; >@@ -232,6 +233,7 @@ sub process_invoice { > > # Plugin has its own invoice processor, only run it and not the standard invoice processor below > if ( $plugin_class ) { >+ eval "require $plugin_class"; # Import the class, eval is needed because requiring a string doesn't work like requiring a bareword > my $plugin = $plugin_class->new(); > if ( $plugin->can('edifact_process_invoice') ) { > Koha::Plugins::Handler->run( >-- >2.20.1
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 31054
:
136574
| 137460