Summary: | Text on the "Show SQL code" button at guided_reports.pl breaks if report notice templates exist | ||
---|---|---|---|
Product: | Koha | Reporter: | Jason Robb <jrobb> |
Component: | Templates | Assignee: | Pedro Amorim <pedro.amorim> |
Status: | RESOLVED FIXED | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | trivial | ||
Priority: | P5 - low | CC: | caroline.cyr-la-rose, cbrannon, fridolin.somers, julian.maurice, kyle, lucas, martin.renvoize, pedro.amorim |
Version: | Main | Keywords: | Sandbox |
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36297 | ||
Change sponsored?: | --- | Patch complexity: | String patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.05.00,23.11.04
|
|
Circulation function: | |||
Bug Depends on: | 34136 | ||
Bug Blocks: | 36297, 36157 | ||
Attachments: |
Broken text on 'Show SQL code' button
Bug 36158: Update t iterator variable Bug 36158: Update t iterator variable Bug 36158: Update t iterator variable |
Description
Jason Robb
2024-02-23 15:15:42 UTC
Created attachment 162389 [details] [review] Bug 36158: Update t iterator variable It seems like its causing some sort of conflict with t('Hide SQL code') further down below in the code, but I'm not sure why. Created attachment 162393 [details] [review] Bug 36158: Update t iterator variable It seems like its causing some sort of conflict with t('Hide SQL code') further down below in the code, but I'm not sure why. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 162581 [details] [review] Bug 36158: Update t iterator variable It seems like its causing some sort of conflict with t('Hide SQL code') further down below in the code, but I'm not sure why. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Trivial fix, clear code.. Passing QA Pushed for 24.05! Well done everyone, thank you! Pushed to 23.11.x for 23.11.04 (In reply to Martin Renvoize from comment #3) > Created attachment 162581 [details] [review] [review] > Bug 36158: Update t iterator variable > > It seems like its causing some sort of conflict with t('Hide SQL code') > further down below in the code, but I'm not sure why. > > Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> > Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Arf there are other places with a var named "t" in TT : > git grep 'FOREACH t IN' origin/master:koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt: [%- FOREACH t IN [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] -%] origin/master:koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt: [%- FOREACH t IN [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] -%] origin/master:koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt: [% FOREACH t IN item_templates.owned %] origin/master:koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt: [% FOREACH t IN item_templates.shared %] origin/master:koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt: [% FOREACH t IN item_templates.owned %] origin/master:koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt: [% FOREACH t IN item_templates.shared %] origin/master:koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt: [% FOREACH t IN club_templates %] origin/master:koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt: [% FOREACH t IN club_templates %] origin/master:koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt: [% FOREACH t IN terms %] Frido can you open a bug for this (if not already). I think it would also be interesting to understand why the conflict happens in the first place, as one would think "for t in templates" would only consider a 't' variable inside the "for" loop. But this was causing an issue somewhere else entirely in the code if I remember correctly. (In reply to Pedro Amorim from comment #8) > Frido can you open a bug for this (if not already). > I think it would also be interesting to understand why the conflict happens > in the first place, as one would think "for t in templates" would only > consider a 't' variable inside the "for" loop. > But this was causing an issue somewhere else entirely in the code if I > remember correctly. I've filed a bug report for Template Toolkit: https://github.com/abw/Template2/issues/317 Kyle Created bug 36297 Missing 23.05.x dependencies, no backport. I'm in 24.05.02 and I can't get the Show SQL code to work on anything running in a template. Am I misunderstanding? |