Bugzilla – Attachment 172743 Details for
Bug 35570
Add a generic master form in ILL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35570: Prevent use of ILL module if deprecated FreeForm backend is installed
Bug-35570-Prevent-use-of-ILL-module-if-deprecated-.patch (text/plain), 4.76 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-10-14 18:01:22 UTC
(
hide
)
Description:
Bug 35570: Prevent use of ILL module if deprecated FreeForm backend is installed
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-10-14 18:01:22 UTC
Size:
4.76 KB
patch
obsolete
>From 4b3732a75aa09461dcf8a70cbae5086e8c886957 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Fri, 15 Dec 2023 15:07:37 -0100 >Subject: [PATCH] Bug 35570: Prevent use of ILL module if deprecated FreeForm > backend is installed > >Test plan: >1) This patch should not be applied in order to be able to go through the previous patch's test plan >2) Install FreeForm, run: >bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh) >3) Please note that you need to be using FreeForm's reorganize_ILL branch at: >https://github.com/PTFS-Europe/koha-ill-freeform/commits/reorganize_ILL/ >4) Visit ILL page: >/cgi-bin/koha/ill/ill-requests.pl >5) Notice there's a configuration error preventing the use of the ILL module. >6) Click the 'about page' link and verify there is a warning about > FreeForm >7) Remove FreeForm from /kohadevbox/koha/Koha/Illbackends and refresh the page >8) Repeat 4), notice the requests are listed as expected and you can now > use the ILL module again. > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > about.pl | 7 +++++++ > ill/ill-requests.pl | 6 ++++++ > koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 11 +++++++++++ > .../intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 2 +- > 4 files changed, 25 insertions(+), 1 deletion(-) > >diff --git a/about.pl b/about.pl >index 4e54b5a2fd7..c2f6e6f591e 100755 >--- a/about.pl >+++ b/about.pl >@@ -357,6 +357,13 @@ if($tab eq 'sysinfo') { > $warnILLConfiguration = 1; > } > >+ # Check if deprecated 'FreeForm' backend is installed >+ my $available_backends = Koha::ILL::Request::Config->new->available_backends; >+ if ( grep( /FreeForm/, @{$available_backends} ) ) { >+ $template->param( ill_deprecated_backend_freeform_is_installed => 1 ); >+ $warnILLConfiguration = 1; >+ } >+ > if ( !C4::Context->preference('ILLPartnerCode') ) { > # partner code not defined > $template->param( ill_partner_code_not_defined => 1 ); >diff --git a/ill/ill-requests.pl b/ill/ill-requests.pl >index 4abde0fdb84..3f093bb062f 100755 >--- a/ill/ill-requests.pl >+++ b/ill/ill-requests.pl >@@ -72,6 +72,12 @@ $template->param( > have_batch => have_batch_backends($backends) > ); > >+if ( grep( /FreeForm/, @{$backends} ) ) { >+ $template->param( >+ ill_deprecated_backend_freeform_is_installed => 1, >+ ); >+} >+ > if ( $backends_available ) { > # Establish what metadata enrichment plugins we have available > my $enrichment_services = get_metadata_enrichment(); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index 13e7c652c3d..0df6c6e8894 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -594,6 +594,17 @@ > </td> > </tr> > [% END %] >+ [% IF ill_deprecated_backend_freeform_is_installed %] >+ <tr> >+ <th scope="row"><strong>Warning</strong> </th> >+ <td> >+ <p>The ILL module is enabled, but the deprecated 'FreeForm' backend is installed.</p> >+ <p>'FreeForm' has since become part of core Koha as 'Standard'.</p> >+ <p>All 'FreeForm' ILL content should've been migrated to 'Standard' upon upgrading Koha to 24.05.</p> >+ <p>To avoid confusion or redundancy, please uninstall the 'FreeForm' backend before using the ILL module.</p> >+ </td> >+ </tr> >+ [% END %] > [% END %] > > [% IF weasyprint_missing %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >index 5f4759bfaf5..23c6e7424f8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >@@ -125,7 +125,7 @@ > [% INCLUDE 'messages.inc' %] > [% END %] > <div id="interlibraryloans"> >- [% IF !backends_available || !has_branch %] >+ [% IF !backends_available || !has_branch || ill_deprecated_backend_freeform_is_installed %] > <div class="alert alert-info">ILL module configuration problem. Take a look at the <a href="/cgi-bin/koha/about.pl?tab=sysinfo">about page</a></div> > [% ELSE %] > [% INCLUDE 'ill-toolbar.inc' %] >-- >2.47.0
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 35570
:
159942
|
159943
|
159944
|
159946
|
159947
|
160452
|
160457
|
160654
|
160655
|
160656
|
160657
|
160658
|
160659
|
160660
|
160686
|
161519
|
161520
|
161521
|
161522
|
161523
|
161524
|
162894
|
162897
|
162898
|
162899
|
162900
|
162901
|
162902
|
162903
|
162904
|
162905
|
164277
|
164278
|
164279
|
164280
|
164281
|
164282
|
164283
|
164284
|
165204
|
165205
|
165206
|
165207
|
165208
|
165209
|
165210
|
165211
|
165286
|
165287
|
165288
|
165289
|
165290
|
165291
|
165292
|
165293
|
167050
|
167051
|
171312
|
171313
|
171314
|
171315
|
171316
|
171317
|
171318
|
171319
|
171320
|
171321
|
171322
|
171323
|
172218
|
172219
|
172722
|
172723
|
172724
|
172725
|
172726
|
172727
|
172728
|
172729
|
172730
|
172731
|
172732
|
172733
|
172734
|
172735
|
172740
|
172741
|
172742
| 172743 |
172744
|
172745
|
172746
|
172747
|
172748
|
172749
|
172750
|
172751
|
172752
|
172753
|
172780
|
172809
|
172811
|
173916
|
173917
|
173918