Bug 17870

Summary: Call to include file incorrectly moved into the footer
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: bouzid.fergani, jonathan.druart, katrin.fischer, kyle, philippe.blouin, testopia
Version: Main   
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: 17416, 17418    
Bug Blocks: 17858, 17859, 17893    
Attachments: Bug 17870 - Call to include file incorrectly moved into the footer
Bug 17870 - Call to include file incorrectly moved into the footer
Bug 17870 - Call to include file incorrectly moved into the footer

Description Owen Leonard 2017-01-09 17:30:03 UTC
In Bug 17418 I moved a line from doc-head-close.inc to js_includes.inc which I shouldn't have: 

-[% PROCESS 'html_helpers.inc' %]

That file isn't JS and many pages depend on it being defined at the top of the page.
Comment 1 Owen Leonard 2017-01-09 17:36:01 UTC
Affected would be any templates which include:

[% PROCESS options_for_libraries...

or

[% PROCESS options_for_authorised_value_categories...

...because those blocks are defined in html_helpers.inc. The breakage would only occur if you tried to add [% SET footerjs = 1 %] to any of those templates.
Comment 2 Owen Leonard 2017-01-09 17:44:27 UTC
Created attachment 58705 [details] [review]
Bug 17870 - Call to include file incorrectly moved into the footer

This patch moves a line of template code from js_includes.inc back into
doc-head-close.inc where it belongs.

To test, apply the patch and view a page which uses a template that
depends on html_helpers.inc being processed. For example:

- The set library page
- The holds queue report
- The new patron form

The pages should work correctly.
Comment 3 Claire Gravely 2017-01-10 07:17:09 UTC
Created attachment 58719 [details] [review]
Bug 17870 - Call to include file incorrectly moved into the footer

This patch moves a line of template code from js_includes.inc back into
doc-head-close.inc where it belongs.

To test, apply the patch and view a page which uses a template that
depends on html_helpers.inc being processed. For example:

- The set library page
- The holds queue report
- The new patron form

The pages should work correctly.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Comment 4 Jonathan Druart 2017-01-10 07:57:57 UTC
Created attachment 58720 [details] [review]
Bug 17870 - Call to include file incorrectly moved into the footer

This patch moves a line of template code from js_includes.inc back into
doc-head-close.inc where it belongs.

To test, apply the patch and view a page which uses a template that
depends on html_helpers.inc being processed. For example:

- The set library page
- The holds queue report
- The new patron form

The pages should work correctly.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Kyle M Hall 2017-01-13 11:27:26 UTC
Pushed to master for 17.05, thanks Owen!
Comment 6 Katrin Fischer 2017-01-15 16:27:08 UTC
This depends on bug 17418, which is not in 16.11.