Closed Bug 135291 Opened 21 years ago Closed 21 years ago

template version strings break templates

Categories

(Bugzilla :: Bugzilla-General, defect, P1)

2.15
defect

Tracking

()

RESOLVED FIXED
Bugzilla 2.16

People

(Reporter: jayvdb, Assigned: zach)

References

Details

Attachments

(1 file, 3 obsolete files)

The recent template version strings  (e.g. <!-- 1.0@bugzilla.org --> ) which
have been inserted into all templates break non-xml templates, specificually the
follow mail templates (from bug 23067)
token/emailchangenew.txt.tmpl
token/emailchangeold.txt.tmpl
token/tokencancel.txt.tmpl
The sidebar also appears to be breaking as a result.  The following error occurs
when the template version string is in template/default/sidebar/xul.tmpl

XML Parsing Error: xml processing instruction not at start of external entity
Location: https://dev.callista.com.au/bugzilla/sidebar.cgi
Line Number 4, Column 1:<?xml version="1.0"?>
^
Summary: template version strings break non-xml templates → template version strings break templates
doh.  Knew there was a reason they were supposed to be in TT comments instead of
HTML... :-)
Assignee: justdave → zach
Priority: -- → P1
Target Milestone: --- → Bugzilla 2.16
*** Bug 135321 has been marked as a duplicate of this bug. ***
see what I get for listening to your "put it in html comments" stuff? ;)

I'm going to be leaving for the weekend tomorrow, but I'll try and get 
something out for this ASAP because it's a blocker. What I am thinking is 
to change the version string to a template comment for all non html/xml 
files while leaving the rest as-is. Everyone agree?

cc'ing gerv on this as well
Attached patch Patch to fix (obsolete) — Splinter Review
Attached patch Let us try this again... (obsolete) — Splinter Review
Attachment #77606 - Attachment is obsolete: true
Don't forget to add version strings to these templates:

template/default/global/user-error.html.tmpl
template/default/global/code-error.html.tmpl
Attachment #77608 - Attachment is obsolete: true
Attachment #77611 - Flags: review+
Comment on attachment 77611 [details] [diff] [review]
Now I really start to get annoyed

r=bbaetz
Attachment #77611 - Attachment is obsolete: true
moz doesn't like me, here:

? templatepatch.patch
Index: t/004template.t
===================================================================
RCS file: /cvsroot/mozilla/webtools/bugzilla/t/004template.t,v
retrieving revision 1.9
diff -u -2 -r1.9 004template.t
--- t/004template.t	3 Apr 2002 20:01:01 -0000	1.9
+++ t/004template.t	4 Apr 2002 06:39:46 -0000
@@ -95,5 +95,5 @@
     open(TMPL,"$include_path/$file");
     my $firstline = <TMPL>;
-    if ($firstline =~ /<!-- \d+\.\d+\@[\w\._]+ -->/) {
+    if ($firstline =~ /\d+\.\d+\@[\w\.-]+/) {
         ok(1,"$file has a version string");
     } else {
Index: template/default/global/code-error.html.tmpl
===================================================================
RCS file:
/cvsroot/mozilla/webtools/bugzilla/template/default/global/code-error.html.tmpl,v
retrieving revision 1.1
diff -u -2 -r1.1 code-error.html.tmpl
--- template/default/global/code-error.html.tmpl	3 Apr 2002 23:00:29 -0000	1.1
+++ template/default/global/code-error.html.tmpl	4 Apr 2002 06:39:46 -0000
@@ -1,2 +1,3 @@
+<!-- 1.0@bugzilla.org -->
 [%# The contents of this file are subject to the Mozilla Public
   # License Version 1.1 (the "License"); you may not use this file
Index: template/default/global/user-error.html.tmpl
===================================================================
RCS file:
/cvsroot/mozilla/webtools/bugzilla/template/default/global/user-error.html.tmpl,v
retrieving revision 1.1
diff -u -2 -r1.1 user-error.html.tmpl
--- template/default/global/user-error.html.tmpl	3 Apr 2002 23:00:29 -0000	1.1
+++ template/default/global/user-error.html.tmpl	4 Apr 2002 06:39:46 -0000
@@ -1,2 +1,3 @@
+<!-- 1.0@bugzilla.org -->
 [%# The contents of this file are subject to the Mozilla Public
   # License Version 1.1 (the "License"); you may not use this file
Index: template/default/sidebar/xul.tmpl
===================================================================
RCS file: /cvsroot/mozilla/webtools/bugzilla/template/default/sidebar/xul.tmpl,v
retrieving revision 1.3
diff -u -2 -r1.3 xul.tmpl
--- template/default/sidebar/xul.tmpl	3 Apr 2002 20:01:38 -0000	1.3
+++ template/default/sidebar/xul.tmpl	4 Apr 2002 06:39:46 -0000
@@ -1,3 +1,3 @@
-<!-- 1.0@bugzilla.org -->
+[%# 1.0@bugzilla.org %]
 [%# -*- mode: sgml -*- %]
 [%# The contents of this file are subject to the Mozilla Public
Index: template/default/token/emailchangenew.txt.tmpl
===================================================================
RCS file:
/cvsroot/mozilla/webtools/bugzilla/template/default/token/emailchangenew.txt.tmpl,v
retrieving revision 1.2
diff -u -2 -r1.2 emailchangenew.txt.tmpl
--- template/default/token/emailchangenew.txt.tmpl	3 Apr 2002 20:01:42 -0000	1.2
+++ template/default/token/emailchangenew.txt.tmpl	4 Apr 2002 06:39:47 -0000
@@ -1,3 +1,3 @@
-<!-- 1.0@bugzilla.org -->
+[%# 1.0@bugzilla.org %]
 [%# The contents of this file are subject to the Mozilla Public
   # License Version 1.1 (the "License"); you may not use this file
Index: template/default/token/emailchangeold.txt.tmpl
===================================================================
RCS file:
/cvsroot/mozilla/webtools/bugzilla/template/default/token/emailchangeold.txt.tmpl,v
retrieving revision 1.2
diff -u -2 -r1.2 emailchangeold.txt.tmpl
--- template/default/token/emailchangeold.txt.tmpl	3 Apr 2002 20:01:42 -0000	1.2
+++ template/default/token/emailchangeold.txt.tmpl	4 Apr 2002 06:39:47 -0000
@@ -1,3 +1,3 @@
-<!-- 1.0@bugzilla.org -->
+[%# 1.0@bugzilla.org %]
 [%# The contents of this file are subject to the Mozilla Public
   # License Version 1.1 (the "License"); you may not use this file
Index: template/default/token/tokencancel.txt.tmpl
===================================================================
RCS file:
/cvsroot/mozilla/webtools/bugzilla/template/default/token/tokencancel.txt.tmpl,v
retrieving revision 1.2
diff -u -2 -r1.2 tokencancel.txt.tmpl
--- template/default/token/tokencancel.txt.tmpl	3 Apr 2002 20:01:42 -0000	1.2
+++ template/default/token/tokencancel.txt.tmpl	4 Apr 2002 06:39:47 -0000
@@ -1,3 +1,3 @@
-<!-- 1.0@bugzilla.org -->
+[%# 1.0@bugzilla.org %]
 [%# The contents of this file are subject to the Mozilla Public
   # License Version 1.1 (the "License"); you may not use this file
r=ddk (will probably have to apply patch manually)
fix is in
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.