Summary: | Cannot use i18n.inc from memberentrygen | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | Pushed to oldstable --- | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | trivial | ||
Priority: | P5 - low | CC: | dcook, fridolin.somers, julian.maurice, lucas |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36297 | ||
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.03,23.05.09
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 35329 | ||
Attachments: |
Bug 35701: DO NOT PUSH - to recreate the problem
Bug 35701: Do not use t Bug 35701: Do not use t Bug 35701: (follow-up) Fix last instance of t variable Bug 35701: Do not use t Bug 35701: (follow-up) Fix last instance of t variable |
Description
Jonathan Druart
2024-01-04 14:53:35 UTC
Created attachment 160535 [details] [review] Bug 35701: DO NOT PUSH - to recreate the problem Hit http://localhost:8081/cgi-bin/koha/members/memberentry.pl open the console See "Ms", while we expect "foo" There's a [% FOREACH t ... %] earlier in the same file. It probably overrides the t function. erk good catch, I searched for "t = "! Thanks! Created attachment 160693 [details] [review] Bug 35701: Do not use t To not interfer with the t from I18N On bug 35329 we are using the I18N TT plugin that is providing the 't' subroutine. This loop is redefining the subroutine, therefore it is not longer accessible. Test plan: Edit a patron and confirm the the "Title" dropdown still contain the different values of syspref BorrowersTitles. There is one [% t | html %] left (under ELSE) Created attachment 160708 [details] [review] Bug 35701: Do not use t To not interfer with the t from I18N On bug 35329 we are using the I18N TT plugin that is providing the 't' subroutine. This loop is redefining the subroutine, therefore it is not longer accessible. Test plan: Edit a patron and confirm the the "Title" dropdown still contain the different values of syspref BorrowersTitles. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 160709 [details] [review] Bug 35701: (follow-up) Fix last instance of t variable Signed-off-by: Owen Leonard <oleonard@myacpl.org> Variable scope in template toolkit definitely leaves a lot to be desired. I've bumped into similar issues with MACROs in email templates as well.. Should probably change this bug title although I don't have a good title immediately in mind... Created attachment 161094 [details] [review] Bug 35701: Do not use t To not interfer with the t from I18N On bug 35329 we are using the I18N TT plugin that is providing the 't' subroutine. This loop is redefining the subroutine, therefore it is not longer accessible. Test plan: Edit a patron and confirm the the "Title" dropdown still contain the different values of syspref BorrowersTitles. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 161095 [details] [review] Bug 35701: (follow-up) Fix last instance of t variable Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Scoping fix, all working now. Passing QA Pushed for 24.05! Well done everyone, thank you! Pushed to 23.11.x for 23.11.03 Backported to 23.05.x for upcoming 23.05.09 |