Bug 28712 - Printed slips for fees come up empty if no notice is defined for the user's preferred language
Summary: Printed slips for fees come up empty if no notice is defined for the user's p...
Status: RESOLVED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: 20.11
Hardware: All All
: P5 - low normal (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-14 09:39 UTC by Katrin Fischer
Modified: 2022-07-17 10:21 UTC (History)
3 users (show)

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


Attachments
Bug 28712: Add fallback to default for missing language template (985 bytes, patch)
2021-11-09 10:49 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2021-07-14 09:39:51 UTC
When printing slips for account actions and using the TanslatedNotices feature, there is no fallback to "default", when there is not notice template for the user's preferred language. See bug 28487 for a similar instance of this.

To test:
- Create a manual fee of any kind
- Pay it
- Click on "print" and confirm the slip comes up with content
- Turn on TranslateNotices system preference
- Repeat "print" action - the slip should still print
- Edit your patron and set a language other than "default"
- Repeat print, the page now comes up empty

I think this is quite hard to understand track down for users to figure out, so while there is a workaround (setting the notices) we should really fix it.
Comment 1 Katrin Fischer 2021-07-14 10:29:20 UTC
Hm, also noticing a behaviour change here: 
When the notices were hardcoded, you could switch the language notice by switching the GUI language. Not it depends on the settings in the patron record.
This means it's no longer possible to print i.e. an English/German slip on request.

I wonder how others see this and if we should file a separate enhancement request to allow choosing the slip language to print?
Comment 2 Jonathan Druart 2021-07-16 09:45:16 UTC
Did you report it for master? Should have been fixed by bug 26734.
Comment 3 Katrin Fischer 2021-07-19 21:36:40 UTC
Should have added we are seeing this in latest 20.11. I believe it's also in 21.05.

Bug 26734 doesn't qualify for backporting (changes to notices), so we might want an easy temp fix here.
Comment 4 Martin Renvoize 2021-11-09 10:05:46 UTC
OK.. I did some digging.. it's actually bug 28514 that resolves this further down the line.
Comment 5 Martin Renvoize 2021-11-09 10:49:16 UTC
Created attachment 127464 [details] [review]
Bug 28712: Add fallback to default for missing language template
Comment 6 Martin Renvoize 2021-11-09 10:50:40 UTC
Taking inspiration from bug 28487 to produce a fix for older versions here.. this is already resolved in 21.11 onwards by bug 28514.
Comment 7 David Nind 2021-11-10 21:44:18 UTC
I had a go at testing on 21.05, but I wasn't able to reproduce the issue.
Comment 8 Katrin Fischer 2021-11-11 08:58:38 UTC
I think the dependency is in 21.05 - we have run into this in 20.11. I have corrected the version on the bug.
Comment 9 David Nind 2021-11-11 10:26:12 UTC
(In reply to Katrin Fischer from comment #8)
> I think the dependency is in 21.05 - we have run into this in 20.11. I have
> corrected the version on the bug.

Thanks Katrin! I was able to recreate the issue on 20.11.
Comment 10 David Nind 2021-11-11 12:56:07 UTC
I still get a blank PDF - changed the default to english, also installed and de-DE, but PDF still blank.
Comment 11 Martin Renvoize 2022-05-06 13:07:34 UTC
Maybe // instead of ||.. I've not really got any 20.11's having problems at this point.. so downgrading to normal for now.
Comment 12 Katrin Fischer 2022-07-17 10:21:50 UTC
I can confirm this if fixed in master. Joubu pointed out that bug 26734 fixed it in 21.05. As 20.11 is no longer maintained, this is a WONTFIX now.