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> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
033e154fdf
commit
83e8f0e0c3
7
about.pl
7
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 );
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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 %]
|
||||
|
|
|
|||
|
|
@ -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' %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue