Bug 20974

Summary: Remove files left behind after removing Solr
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: minor    
Priority: P5 - low CC: fridolin.somers, katrin.fischer, m.de.rooy, martin.renvoize, nick
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 12538    
Bug Blocks:    
Attachments: Bug 20974: Remove files left behind after removing Solr
Bug 20974: Remove files left behind after removing Solr
Bug 20974: Remove files left behind after removing Solr

Description Owen Leonard 2018-06-21 13:34:10 UTC
Three OPAC template files were left behind when Solr support was removed:

opac-tmpl/bootstrap/en/includes/search/facets.inc
opac-tmpl/bootstrap/en/includes/search/page-numbers.inc
opac-tmpl/bootstrap/en/includes/search/resort_form.inc

Originally added by Bug 8233, "SearchEngine: Add a Koha::SearchEngine module"
http://git.koha-community.org/gitweb/?p=koha.git;a=commit;h=623f3a2c84fea04e4ad6203db49f6fdd6cfc62cd
Comment 1 Owen Leonard 2018-06-21 13:41:47 UTC
Created attachment 76229 [details] [review]
Bug 20974: Remove files left behind after removing Solr

Some files were left behind when Bug 12538 removed support for Solr.
This patch removes them.

To test, apply the patch and fail to observe the existence of these
files:

koha-tmpl/opac-tmpl/bootstrap/en/includes/search/facets.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/search/page-numbers.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/search/resort_form.inc

Perform a search in the OPAC to confirm that nothing broke.
Comment 2 Katrin Fischer 2018-07-08 15:31:44 UTC
Created attachment 76762 [details] [review]
Bug 20974: Remove files left behind after removing Solr

Some files were left behind when Bug 12538 removed support for Solr.
This patch removes them.

To test, apply the patch and fail to observe the existence of these
files:

koha-tmpl/opac-tmpl/bootstrap/en/includes/search/facets.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/search/page-numbers.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/search/resort_form.inc

Perform a search in the OPAC to confirm that nothing broke.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 3 Marcel de Rooy 2018-07-13 06:19:39 UTC
How did you test this, guys?

git grep -E "INCLUDE [']?facets.inc"
git grep -E "INCLUDE [']?page-numbers.inc"
git grep -E "INCLUDE [']?resort_form.inc"

Every statement still produces results !
"Perform a search in the OPAC" is stated too simply? The test depends on more settings.
Comment 4 Katrin Fischer 2018-07-15 17:17:55 UTC
Hi Marcel, please take a closer look. There are small differences:


1) git grep -E "INCLUDE [']?facets.inc"
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt:[% INCLUDE 'facets.inc' %]

This is the intranet version of the file. The patch removes from bootstrap.

2) git grep -E "INCLUDE [']?page-numbers.inc"
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt:                [% INCLUDE 'page-numbers.inc' %]
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt:        [% INCLUDE 'page-numbers.inc' %]
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt:                            [% INCLUDE 'page-numbers.inc' %]
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt:                    <div id="top-pages">[% INCLUDE 'page-numbers.inc' %]</div>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt:                        <div id="bottom-pages">[% INCLUDE 'page-numbers.inc' %]</div>

The file removed is from includes/search/, not includes. The file in includes is still there.

3) git grep -E "INCLUDE [']?resort_form.inc"
Same for this one, the difference is includes/search vs. includes.
Comment 5 Marcel de Rooy 2018-07-16 08:01:10 UTC
(In reply to Katrin Fischer from comment #4)
> Hi Marcel, please take a closer look. There are small differences:
> 
> 
> 1) git grep -E "INCLUDE [']?facets.inc"
> koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt:[% INCLUDE
> 'facets.inc' %]
> 
> This is the intranet version of the file. The patch removes from bootstrap.
> 
> 2) git grep -E "INCLUDE [']?page-numbers.inc"
> koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt:               
> [% INCLUDE 'page-numbers.inc' %]
> koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt:        [%
> INCLUDE 'page-numbers.inc' %]
> koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt:           
> [% INCLUDE 'page-numbers.inc' %]
> koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt:                   
> <div id="top-pages">[% INCLUDE 'page-numbers.inc' %]</div>
> koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt:                   
> <div id="bottom-pages">[% INCLUDE 'page-numbers.inc' %]</div>
> 
> The file removed is from includes/search/, not includes. The file in
> includes is still there.
> 
> 3) git grep -E "INCLUDE [']?resort_form.inc"
> Same for this one, the difference is includes/search vs. includes.

Hmm. Sorry for overlooking this.
Comment 6 Marcel de Rooy 2018-07-16 08:06:24 UTC
Created attachment 76970 [details] [review]
Bug 20974: Remove files left behind after removing Solr

Some files were left behind when Bug 12538 removed support for Solr.
This patch removes them.

To test, apply the patch and fail to observe the existence of these
files:

koha-tmpl/opac-tmpl/bootstrap/en/includes/search/facets.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/search/page-numbers.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/search/resort_form.inc

Perform a search in the OPAC to confirm that nothing broke.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Nick Clemens 2018-07-19 17:37:04 UTC
Awesome work all!

Pushed to master for 18.11
Comment 8 Martin Renvoize 2018-08-02 13:48:50 UTC
Pushed to 18.05.x for 18.05.03, always nice to tidy up a bit :)