Bug 31390

Summary: Remove noisy warns in C4::Templates
Product: Koha Reporter: David Cook <dcook>
Component: Architecture, internals, and plumbingAssignee: David Cook <dcook>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: lucas, victor
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:
22.11.00,22.05.06,21.11.12
Bug Depends on:    
Bug Blocks: 31380    
Attachments: Bug 31390: Remove noisy warns in C4::Templates
Bug 31390: Remove noisy warns in C4::Templates
Bug 31390: Remove noisy warns in C4::Templates

Description David Cook 2022-08-18 01:08:25 UTC
If you don't provide a $query argument for C4::Templates::gettemplate it will warn, but it's just passing the $query object to C4::Languages::getlanguage() which is often invoked in Koha without it. It's a totally unnecessary warning.
Comment 1 David Cook 2022-08-18 01:15:50 UTC
Created attachment 139310 [details] [review]
Bug 31390: Remove noisy warns in C4::Templates

This patch removes two noisy warnings from C4::Templates

0) Apply patch and koha-plack --restart kohadev
1) Go to http://localhost:8081/
2) Note no warnings in /var/log/koha/kohadev/plack-intranet-error.log
3) Go to http://localhost:8080/
3) Note no warnings in /var/log/koha/kohadev/plack-opac-error.log
Comment 2 Kyle M Hall 2022-08-18 15:11:33 UTC
Created attachment 139397 [details] [review]
Bug 31390: Remove noisy warns in C4::Templates

This patch removes two noisy warnings from C4::Templates

0) Apply patch and koha-plack --restart kohadev
1) Go to http://localhost:8081/
2) Note no warnings in /var/log/koha/kohadev/plack-intranet-error.log
3) Go to http://localhost:8080/
3) Note no warnings in /var/log/koha/kohadev/plack-opac-error.log

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 3 Fridolin Somers 2022-08-20 07:37:36 UTC
Created attachment 139533 [details] [review]
Bug 31390: Remove noisy warns in C4::Templates

This patch removes two noisy warnings from C4::Templates

0) Apply patch and koha-plack --restart kohadev
1) Go to http://localhost:8081/
2) Note no warnings in /var/log/koha/kohadev/plack-intranet-error.log
3) Go to http://localhost:8080/
3) Note no warnings in /var/log/koha/kohadev/plack-opac-error.log

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 4 Tomás Cohen Arazi 2022-08-22 16:43:32 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 5 Lucas Gass 2022-10-14 21:59:35 UTC
Backported to 22.05.x for upcoming 22.05.06 release
Comment 6 Victor Grousset/tuxayo 2022-10-21 22:28:05 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document it seems, marking resolved.
Comment 7 Arthur Suzuki 2022-10-22 22:10:34 UTC
Thanks!

Pushed to 21.11 for 21.11.12