Created attachment 162386 [details] Broken text on 'Show SQL code' button When a report notice template exists (using the feature added in bug 34136), if you click the "Show SQL code" button after running a report the text on the button changes to something like "Koha::Notice::Template=HASH(xxxxx)" To replicate: - Create a notice with the module of "Reports" -- add something to the "Print" section. Example from the other bug: [% FOREACH b IN data %] <div class="panel panel-default"> <div class="panel-heading">[% b.surname %], [% b.firstname %]</div> <div class="panel-body">Expiration: [% b.dateexpiry %]</div> <div class="panel-footer">ID: [% b.borrowernumber %]</div> </div> [% END %] - Create and run a saved report. Example from the other bug: SELECT * FROM borrowers - Click the "Show SQL code" button
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?