[Bug 5462] New: Fix variable names so we dont break template::toolkit
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 Summary: Fix variable names so we dont break template::toolkit Change sponsored?: --- Product: Koha Version: HEAD Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: Architecture, internals, and plumbing AssignedTo: gmcharlt@gmail.com ReportedBy: chris@bigballofwax.co.nz QAContact: koha-bugs@lists.koha-community.org Estimated Hours: 0.0 Variables for template toolkit need to be valid perl variable names. Some of our template variables aren't. We should fix them even if we weren't changing to template::toolkit but we definitely need to before we can move. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent Patch Status|--- |Patch Pushed --- Comment #1 from Chris Cormack <chris@bigballofwax.co.nz> 2010-11-30 21:31:31 UTC --- new/awaiting_qa/5462 has the fixes please test -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |colin.campbell@ptfs-europe. | |com Patch Status|Patch Pushed |Signed Off --- Comment #2 from Colin Campbell <colin.campbell@ptfs-europe.com> 2011-02-03 10:22:30 UTC --- Branch bug_5462_signoff on git://github.com/colinsc/koha.git has been rebased against current master and tested for completeness -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Signed Off |Patch Pushed --- Comment #3 from Chris Cormack <chris@bigballofwax.co.nz> 2011-02-03 19:58:39 UTC --- Pushed, please test -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 --- Comment #4 from Owen Leonard <oleonard@myacpl.org> 2011-02-07 17:27:03 UTC --- Created attachment 3085 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3085 Proposed correction Previous commit modified checks for the item-level_itypes preference to look for a different variable name but didn't update where that variable is set in Auth.pm. Other scripts perform a direct check of item-level_itypes and must continue to use the name of the variable in the database. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> 2011-02-08 08:09:15 UTC --- Follow up patch pushed -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #6 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-02-09 13:14:06 UTC --- Current master does not show marc details for a record in staff client. All tabs have disappeared. (Click on MARC tab in normal view for one record.) Problem seems to be connected with one of the patches connected to this report. Commit 8fd29f3d62d1aa5d7e728032ea00bd98f3aef52d for this report makes the marc details disappear.. Few commits before the patch, at e29aca325d199468673365ee7540760b38630833, I am still seeing marc details. Apparently, some work on the templates should be adjusted? -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 --- Comment #7 from Owen Leonard <oleonard@myacpl.org> 2011-02-09 13:46:56 UTC --- Created attachment 3109 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3109 Correction for MARCdetail.pl A change was made to MARCdetail.tmpl without making a corresponding change to MARCdetail.pl. I've reworked the original change so that both can work together. 0XX --> tab0XX Apparently TMPL variables can't start with a number now? -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Patch Pushed |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nengard@gmail.com --- Comment #8 from Owen Leonard <oleonard@myacpl.org> 2011-02-11 19:32:12 UTC --- *** Bug 5744 has been marked as a duplicate of this bug. *** -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Signed Off |Does not apply --- Comment #9 from Chris Cormack <chris@bigballofwax.co.nz> 2011-02-13 21:36:36 UTC --- Signed off patch does not apply Applying: Follow-up fix for Bug 5462, Fix variable names so we dont break template::toolkit Using index info to reconstruct a base tree... error: patch failed: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tmpl:45 error: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tmpl: patch does not apply Did you hand edit your patch? It does not apply to blobs recorded in its index. Cannot fall back to three-way merge. Patch failed at 0001 Follow-up fix for Bug 5462, Fix variable names so we dont break template::toolkit -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Patch Status|Does not apply |Needs Signoff --- Comment #10 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-02-14 08:12:58 UTC --- I recreated the patch, but the referred blobs are still the same. And the patches still apply. I tested it again with latest commit mentioned below. Are you sure that you tested this patch with a clean working dir? What could be the reason for not matching blobs? [marcel@RKM004 testclone]$ git apply ../0001-5462.patch [marcel@RKM004 testclone]$ git reset --hard HEAD is now at f6be5ef Bug 5751 : Follow up patch, removing unused variable and fixing copyright [marcel@RKM004 testclone]$ git am -3 ../0001-5462.patch Applying: Follow-up fix for Bug 5462, Fix variable names so we dont break template::toolkit -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 --- Comment #11 from Nicole C. Engard <nengard@gmail.com> 2011-02-16 13:52:52 UTC --- Created attachment 3159 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3159 follow up patch Changing the variable names broke the messaging preferences. This patch brings back that functionality. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #3159|0 |1 is patch| | Attachment #3159|application/octet-stream |text/plain mime type| | -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Signed Off |Patch Pushed --- Comment #12 from Chris Cormack <chris@bigballofwax.co.nz> 2011-02-16 20:29:01 UTC --- Follow up patch pushed -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |5917 --- Comment #13 from MJ Ray (software.coop) <mjr@ttllp.co.uk> 2011-03-04 10:26:52 UTC --- This bug is mentioned in: Follow-up correction for Bug 5462 - Fix variable names for template::toolkit http://lists.koha-community.org/pipermail/koha-patches/2011-February/013775.... Follow-up fix for Bug 5462, Fix variable names so we dont break template::toolkit http://lists.koha-community.org/pipermail/koha-patches/2011-February/013796.... Follow-up fix for Bug 5462, Fix variable names so we dont break template::toolkit http://lists.koha-community.org/pipermail/koha-patches/2011-February/013797.... Follow up on Bug 5462: fixing variable names breaks messaging preference form http://lists.koha-community.org/pipermail/koha-patches/2011-February/013873.... Follow-up fix for Bug 5462, Fix variable names so we dont break template::toolkit http://lists.koha-community.org/pipermail/koha-patches/2011-February/013848.... -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|PATCH-Sent |P5 Status|ASSIGNED |NEW --- Comment #14 from Owen Leonard <oleonard@myacpl.org> 2011-03-30 20:16:12 UTC --- I discovered a new instance of this bug. In Messaging.pm sub GetMessagingOptions queries the message_attributes table for message_attributes.message_name and assigns a series of variables based on that name. This means we end up with variables named things like "Item due," and thus the template has checks for things like <!-- TMPL_IF NAME="Item Due" --> and <!-- TMPL_ELSIF NAME="Item Check-in" --> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 --- Comment #15 from Owen Leonard <oleonard@myacpl.org> 2011-03-31 16:21:01 UTC --- Created attachment 3578 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3578 Fix for patron messaging attributes Doing a replace on non-word characters: $row->{'message_name'} =~ s/\W/\_/g; This seems to work with the existing message name values, but I don't know if that is robust enough to prevent future issues. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent Patch Status|Patch Pushed |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 --- Comment #16 from MJ Ray (software.coop) <mjr@ttllp.co.uk> 2011-04-11 08:32:25 UTC --- This bug is mentioned in: Incremental fix for Bug 5462, Fix variable names so we dont break template::toolkit http://lists.koha-community.org/pipermail/koha-patches/2011-March/014402.htm... -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Patch Pushed -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 --- Comment #17 from Zeno Tajoli <tajoli@cilea.it> 2011-05-12 19:55:34 UTC --- This bug is partial done in 3.6.x tree. To do: Insert this line at C4/Members/Messaging.pm,line 212: $row->{'message_name'} =~ s/\W/\_/g; With this last commit the bug is done. Or, more exactly, all patch here present will be commit into the master. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 --- Comment #18 from Chris Cormack <chris@bigballofwax.co.nz> 2011-05-12 22:19:30 UTC --- Zeno, the message names have now been fixed in the database. So that line should not be needed, ie insert into `message_attributes` (`message_attribute_id`, message_name, `takes_days`) values (1, 'Item_Due', 0), (2, 'Advance_Notice', 1), (4, 'Hold_Filled', 0), (5, 'Item_Check_in', 0), (6, 'Item_Checkout', 0); $DBversion = "3.03.00.051"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { print "Upgrade to $DBversion done (Remove spaces and dashes from message_attribute names)\n"; $dbh->do("UPDATE message_attributes SET message_name = 'Item_Due' WHERE message_name='Item Due'"); $dbh->do("UPDATE message_attributes SET message_name = 'Advance_Notice' WHERE message_name='Advance Notice'"); $dbh->do("UPDATE message_attributes SET message_name = 'Hold_Filled' WHERE message_name='Hold Filled'"); $dbh->do("UPDATE message_attributes SET message_name = 'Item_Check_in' WHERE message_name='Item Check-in'"); $dbh->do("UPDATE message_attributes SET message_name = 'Item_Checkout' WHERE message_name='Item Checkout'"); SetVersion ($DBversion); } So i think we can mark this resolved fixed ... do you agree? -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 --- Comment #19 from Zeno Tajoli <tajoli@cilea.it> 2011-05-13 08:13:59 UTC --- Created attachment 4100 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=4100 Update for IT sql definition -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 Zeno Tajoli <tajoli@cilea.it> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tajoli@cilea.it --- Comment #20 from Zeno Tajoli <tajoli@cilea.it> 2011-05-13 08:16:22 UTC --- To cloese the patch, we need to to update also italian .sql file installer/data/mysql/it-IT/necessari/sample_notices_message_attributes.sql I have insert a patch for it here (as attach) and I send it to koha-patches. The patch is for 3.6 and 3.4 also. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 --- Comment #21 from Zeno Tajoli <tajoli@cilea.it> 2011-05-13 08:17:25 UTC --- Link to koha-patches: http://lists.koha-community.org/pipermail/koha-patches/2011-May/015047.html -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 Zeno Tajoli <tajoli@cilea.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Patch Pushed |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #3085|0 |1 is obsolete| | Attachment #3109|0 |1 is obsolete| | Attachment #3159|0 |1 is obsolete| | Attachment #3578|0 |1 is obsolete| | Attachment #4100|0 |1 is obsolete| | --- Comment #22 from Chris Cormack <chris@bigballofwax.co.nz> 2011-05-30 08:26:12 UTC --- Created attachment 4299 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=4299 Update of the italian sql files The bug is about strings that are used as variables by Template::Toolkit The strings need to be like valid perl variable names. To fix the bug we need to fix also .sql files. Others .sql files are OK. Italian .sql file need Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Signed Off --- Comment #23 from Chris Cormack <chris@bigballofwax.co.nz> 2011-05-30 08:26:54 UTC --- Signed off patch attached -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 Ian Walls <ian.walls@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ian.walls@bywatersolutions. | |com Patch Status|Signed Off |Passed QA --- Comment #24 from Ian Walls <ian.walls@bywatersolutions.com> 2011-07-14 22:32:28 UTC --- Easy patch to read, names consistent. Marking as Passed QA -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Passed QA |Patch Pushed --- Comment #25 from Chris Cormack <chris@bigballofwax.co.nz> 2011-07-14 23:11:37 UTC --- Pushed, please test -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5462 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org