Bug 27822 - Wrong systempreference for AddressFormat (es-ES)
Summary: Wrong systempreference for AddressFormat (es-ES)
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All Linux
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 24973
Blocks:
  Show dependency treegraph
 
Reported: 2021-03-01 13:20 UTC by verolencinas
Modified: 2021-12-13 21:09 UTC (History)
5 users (show)

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


Attachments
Bug 27822: Fix default value for AddressFormat (es-ES) (1.51 KB, patch)
2021-03-02 15:09 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description verolencinas 2021-03-01 13:20:48 UTC
Koha 20.11 has as default "AddressFormat" systempreference "US". If you want to create a new user, you get the error "Template process failed: file error - member-main-address-style-US: not found at /usr/share/koha/lib/C4/Templates.pm line 122" because the system expects "us", not "US".
Changing the systempreference solves the problem.
Comment 1 Jonathan Druart 2021-03-02 14:11:51 UTC
Which exact version of 20.11? It works for me on the latest (20.11.03).
Comment 2 Jonathan Druart 2021-03-02 14:13:31 UTC
Right, scratch the last comment.

How did you end up with "US" instead of "us"?

It looks ok in the installer data (installer/data/mysql/mandatory/sysprefs.sql):
 13 ('AddressFormat','us','us|de|fr','Choose format to display postal addresses', 'Choice'),
Comment 3 verolencinas 2021-03-02 14:14:16 UTC
I had this problem updating 19.11 to 20.11.03.
Comment 4 verolencinas 2021-03-02 14:18:30 UTC
My sysprefs.sql is ok. I'm closing this bug.
Comment 5 verolencinas 2021-03-02 14:23:47 UTC
The "US" in AddressFormat is in installer/data/mysql/localization/es-ES/custom.sql
Comment 6 Jonathan Druart 2021-03-02 15:09:54 UTC
Created attachment 117527 [details] [review]
Bug 27822: Fix default value for AddressFormat (es-ES)

It must be "us" not "US" otherwise you get
Template process failed: file error - member-main-address-style-US: not found at /usr/share/koha/lib/C4/Templates.pm line 122" because the system expects "us", not "US".
Comment 7 Jonathan Druart 2021-03-02 15:11:06 UTC
Indeed, thanks!

A workaround is to, using the UI, save it to another value than "us", then back to "us". It should be set to "us" in DB.
Comment 8 Jonathan Druart 2021-03-03 10:59:44 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 9 Fridolin Somers 2021-03-04 12:17:56 UTC
Pushed to 20.11.x for 20.11.04
Comment 10 Andrew Fuerste-Henry 2021-03-14 18:56:05 UTC
Missing dependency, not backported to 20.05