Bug 36528 - Incorrect path to enquire.js on self checkout slip print page
Summary: Incorrect path to enquire.js on self checkout slip print page
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Kyle M Hall
URL:
Keywords:
Depends on: 29960
Blocks:
  Show dependency treegraph
 
Reported: 2024-04-04 19:41 UTC by Owen Leonard
Modified: 2024-05-31 13:13 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.06


Attachments
Bug 36528: Correct JS assets included in self checkout slip template (18.41 KB, patch)
2024-04-05 16:40 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 36528: Correct JS assets included in self checkout slip template (18.45 KB, patch)
2024-04-08 06:40 UTC, David Nind
Details | Diff | Splinter Review
Bug 36528: Correct JS assets included in self checkout slip template (18.51 KB, patch)
2024-05-17 12:07 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2024-04-04 19:41:43 UTC
Jonathan Druart on Bug 29960:

> I am seeing this in the log when I am on sco/printslip.pl
> 
> [WARN] File not found : lib/enquire.min.js at
> /kohadevbox/koha/Koha/Template/Plugin/Asset.pm line 84.
Comment 1 Owen Leonard 2024-04-05 16:40:49 UTC
Created attachment 164487 [details] [review]
Bug 36528: Correct JS assets included in self checkout slip template

The self checkout's slip print template includes some assets which it
doesn't need (enquire.js) and lacks other that it does (i18n-related
files). This patch correct the problem.

The patch also wraps some code in global.js with a check that the
relevant library has been loaded so that we don't get errors when the
asset isn't included.

To test, apply the patch and clear your browser cache.

- With WebBasedSelfCheck enabled, log in to the self checkout module and
  check some items out.
- Click "Finish" and then "Print receipt..."
- Check the browser console on the receipt page. There should be no
  errors.
- Log in to the OPAC and click the "Messaging" tab on the patron summary
  page.
- Test that the "Digests only" table heading icon shows a tooltip.
- Test that enquire.js is still loading correctly by performing a
  catalog search and narrowing your browser. When the window is narrow
  enough, the facets sidebar should collapse into a "Refine your search"
  button.

Note that the "js_in_body" qa warning is a false positive.
Comment 2 Owen Leonard 2024-04-05 16:42:07 UTC
This patch contains changes to global.js automatically applied on commit by prettier. I'm not sure if that's the expected behavior or not.
Comment 3 David Nind 2024-04-08 06:40:51 UTC
Created attachment 164492 [details] [review]
Bug 36528: Correct JS assets included in self checkout slip template

The self checkout's slip print template includes some assets which it
doesn't need (enquire.js) and lacks other that it does (i18n-related
files). This patch correct the problem.

The patch also wraps some code in global.js with a check that the
relevant library has been loaded so that we don't get errors when the
asset isn't included.

To test, apply the patch and clear your browser cache.

- With WebBasedSelfCheck enabled, log in to the self checkout module and
  check some items out.
- Click "Finish" and then "Print receipt..."
- Check the browser console on the receipt page. There should be no
  errors.
- Log in to the OPAC and click the "Messaging" tab on the patron summary
  page.
- Test that the "Digests only" table heading icon shows a tooltip.
- Test that enquire.js is still loading correctly by performing a
  catalog search and narrowing your browser. When the window is narrow
  enough, the facets sidebar should collapse into a "Refine your search"
  button.

Note that the "js_in_body" qa warning is a false positive.

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Kyle M Hall 2024-05-17 12:07:43 UTC
Created attachment 166888 [details] [review]
Bug 36528: Correct JS assets included in self checkout slip template

The self checkout's slip print template includes some assets which it
doesn't need (enquire.js) and lacks other that it does (i18n-related
files). This patch correct the problem.

The patch also wraps some code in global.js with a check that the
relevant library has been loaded so that we don't get errors when the
asset isn't included.

To test, apply the patch and clear your browser cache.

- With WebBasedSelfCheck enabled, log in to the self checkout module and
  check some items out.
- Click "Finish" and then "Print receipt..."
- Check the browser console on the receipt page. There should be no
  errors.
- Log in to the OPAC and click the "Messaging" tab on the patron summary
  page.
- Test that the "Digests only" table heading icon shows a tooltip.
- Test that enquire.js is still loading correctly by performing a
  catalog search and narrowing your browser. When the window is narrow
  enough, the facets sidebar should collapse into a "Refine your search"
  button.

Note that the "js_in_body" qa warning is a false positive.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Katrin Fischer 2024-05-21 11:25:17 UTC
Easy fix, well tested, no string changes.
QA script failure is noted in the bug as a false positive.
Pushing :)
Comment 6 Katrin Fischer 2024-05-21 11:41:17 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 7 Fridolin Somers 2024-05-29 13:42:31 UTC
Pushed to 23.11.x for 23.11.06
Comment 8 Fridolin Somers 2024-05-29 13:44:11 UTC
In 23.11.x path lib/enquire.min.js is correct but patch still applies to remove this asset and changes in global.js
Comment 9 Lucas Gass 2024-05-31 13:13:06 UTC
Doesn't apply cleanly to 23.05.x, no backport.