The default bug view has changed. See this FAQ.

PROJECT specific template directory is ignored

RESOLVED FIXED in Bugzilla 3.2

Status

()

Bugzilla
Bugzilla-General
RESOLVED FIXED
8 years ago
4 years ago

People

(Reporter: Jochen Wiedmann, Assigned: Max Kanat-Alexander)

Tracking

Bugzilla 3.2
Bug Flags:
approval +
approval3.2 +
blocking3.2.1 +

Details

Attachments

(1 attachment)

v1
667 bytes, patch
Frédéric Buclin
: review+
Details | Diff | Splinter Review
(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/2008111217 Fedora/3.0.4-1.fc10 Firefox/3.0.4
Build Identifier: 

According to the docs (and working in 3.0) the order to search for templates is:

    template/$language/$project
    template/$language/custom
    template/$language/default

In 3.2, the former is no longer working, because 


Reproducible: Always

Steps to Reproduce:
1. Create a bugzilla installation with multiple databases, using the PROJECT variable. In what follows, assume that FOO is one of these projects.
2. Copy file tempate/en/default/index.html.tmpl to template/en/FOO/index.html.tmpl
3. Make a modification that should reflect in the source code, for example
   extend the style_urls variable.
4. Run

     PROJECT=FOO perl checksetup.pl
5. Go to the home page of the FOO project.

Actual Results:  
When loading the home page, your changes are not visible in the HTML source code.

Expected Results:  
When loading the home page, your changes should be visible.

Proposed patch:

--- bugzilla-3.2.orig/Bugzilla/Install/Util.pm	2008-04-03 21:05:38.000000000 +0200
+++ bugzilla-3.2/Bugzilla/Install/Util.pm	2008-12-01 09:19:44.000000000 +0100
@@ -261,12 +261,13 @@
 sub _add_language_set {
     my ($array, $lang, $templatedir) = @_;
     
+    my @add;
     $templatedir ||= bz_locations()->{'templatedir'};
-    my @add = ("$templatedir/$lang/custom", "$templatedir/$lang/default");
-    
     my $project = bz_locations->{'project'};
     push(@add, "$templatedir/$lang/$project") if $project;
     
+    push(@add, "$templatedir/$lang/custom", "$templatedir/$lang/default");
+    
     foreach my $dir (@add) {
         #if (-d $dir) {
             trick_taint($dir);

Comment 1

8 years ago
Max, is this a regression due to bug 374227?
Flags: blocking3.2.1?
Target Milestone: --- → Bugzilla 3.2
Version: unspecified → 3.2
(Assignee)

Comment 2

8 years ago
If this is in fact the case, then yes, it must be a regression from that bug, but I'm extremely surprised that nobody caught it before...
Depends on: 374227
Flags: blocking3.2.1? → blocking3.2.1+

Comment 3

8 years ago
Patch tested and confirmed by mozilla.support.bugzilla user:

http://groups.google.com/group/mozilla.support.bugzilla/browse_thread/thread/081db00ee6543987

(In reply to comment #2)
> If this is in fact the case, then yes, it must be a regression from that bug,
> but I'm extremely surprised that nobody caught it before...

Would testopia help here?  Or is it time to deploy such instance on landfill, too?
(Assignee)

Comment 4

8 years ago
(In reply to comment #3)
> Would testopia help here?  Or is it time to deploy such instance on landfill,
> too?

  No, testopia would not help, it's just a system for tracking test runs. We could use some test, though, and I could set something up as a Tinderbox client, if LpSolit has some idea as to how we'd do the test.

Comment 5

8 years ago
as status is still unconfirmed... 

i can confirm that this bug is also happening here at my installation and
the batch above solves it.
(Assignee)

Updated

8 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: testcase?
(Assignee)

Comment 6

8 years ago
Created attachment 350931 [details] [diff] [review]
v1

Here is a simpler version of Jochen's patch.
Assignee: general → mkanat
Status: NEW → ASSIGNED
Attachment #350931 - Flags: review?(LpSolit)

Comment 7

8 years ago
all right, i also can confirm that this siplier patch works fine here.
thanks a lot!

Comment 8

8 years ago
Comment on attachment 350931 [details] [diff] [review]
v1

Yes, this correctly fixes the problem. r=LpSolit
Attachment #350931 - Flags: review?(LpSolit) → review+

Updated

8 years ago
Flags: approval3.2+
Flags: approval+
(Assignee)

Comment 9

8 years ago
tip:

Checking in Bugzilla/Install/Util.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Install/Util.pm,v  <--  Util.pm
new revision: 1.15; previous revision: 1.14
done

3.2:

Checking in Bugzilla/Install/Util.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Install/Util.pm,v  <--  Util.pm
new revision: 1.14.2.1; previous revision: 1.14
done
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED

Updated

6 years ago
Flags: testcase?

Comment 10

5 years ago
I have the same problem in Release 4.2.3 stable.

Util.pm file is different than this.

Is necesary to reopen this bug?

Comment 11

4 years ago
I created bug 843457 to track this issue in Bugzilla 4.2. Please CC yourself to the new bug.
You need to log in before you can comment on or make changes to this bug.