Closed
Bug 433282
Opened 17 years ago
Closed 17 years ago
Template hooks do not work if HTTP_ACCEPT_LANGUAGE doesn't match any language available
Categories
(Bugzilla :: Bugzilla-General, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.2
People
(Reporter: LpSolit, Assigned: LpSolit)
Details
Attachments
(1 file)
2.05 KB,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
getLanguages() defined in Bugzilla::Template::Plugin::Hook doesn't fall back to english if none of the available languages matches HTTP_ACCEPT_LANGUAGE despite Bugzilla itself falls back to english for the page itself. This means that template hooks are not processeed. Calling include_languages() rather than getLanguages() ensures we use the same language for hooks and pages.
3.0.4 is probably affected too, but this release doesn't have include_languages() and I don't want to hack it too much to get hooks working.
Flags: blocking3.2+
Attachment #320486 -
Flags: review?(mkanat)
Comment 1•17 years ago
|
||
Comment on attachment 320486 [details] [diff] [review]
patch, v1
Yeah, if this works, this is a lot better architecturally anyhow!
Attachment #320486 -
Flags: review?(mkanat) → review+
Comment 2•17 years ago
|
||
Comment on attachment 320486 [details] [diff] [review]
patch, v1
Oh, but do you really even need the use_languages argument? Doesn't that actually *default* to Bugzilla->languages? (And if not, why not?)
Updated•17 years ago
|
Flags: approval+
![]() |
Assignee | |
Comment 3•17 years ago
|
||
(In reply to comment #2)
> Oh, but do you really even need the use_languages argument? Doesn't that
> actually *default* to Bugzilla->languages? (And if not, why not?)
If we don't pass Bugzilla->languages, include_languages() does its own scan of template/* instead of using the (maybe already cached) list of available languages. IMO, we should file a bug to fix it and force it to use Bugzilla->languages instead. This would be a nice cleanup as the caller wouldn't have to call Bugzilla->languages itself.
Comment 4•17 years ago
|
||
(In reply to comment #3)
> If we don't pass Bugzilla->languages, include_languages() does its own scan of
> template/* instead of using the (maybe already cached) list of available
> languages. IMO, we should file a bug to fix it and force it to use
> Bugzilla->languages instead. This would be a nice cleanup as the caller
> wouldn't have to call Bugzilla->languages itself.
Hm...Bugzilla.pm might not be available at the time it's called. But we should have it use _cache and then have Bugzilla.pm use the same cache for Bugzilla->languages or something.
![]() |
Assignee | |
Comment 5•17 years ago
|
||
Checking in Bugzilla/Template/Plugin/Hook.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Template/Plugin/Hook.pm,v <-- Hook.pm
new revision: 1.10; previous revision: 1.9
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•