Closed
Bug 576911
Opened 14 years ago
Closed 14 years ago
The "before_table" hook throws "uninitialized value" errors in the web server log
Categories
(Bugzilla :: Administration, task)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.6
People
(Reporter: LpSolit, Assigned: mkanat)
Details
Attachments
(1 file, 1 obsolete file)
1.02 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
When listing components (editcomponents.cgi), the following errors appear: editcomponents.cgi: Use of uninitialized value $template_name in concatenation (.) or string at Bugzilla/Template/Plugin/Hook.pm line 60. editcomponents.cgi: Use of uninitialized value $type in concatenation (.) or string at Bugzilla/Template/Plugin/Hook.pm line 60. The corresponding line in Hook.pm is: my $extension_template = "$path$template_name-$hook_name.$type.tmpl"; They are undefined because these variables are defined by: $filename =~ m/(.+)\.(.+)\.tmpl$/; my $template_name = $1; my $type = $2; but $filename contains the name of the component instead of "list.html.tmpl". This problem doesn't occur when listing milestones or versions.
Reporter | ||
Comment 1•14 years ago
|
||
(In reply to comment #0) > but $filename contains the name of the component instead of "list.html.tmpl". Oh, I'm pretty sure this is because of this line: $template ||= $context->stash->{component}->{name}; component.name is probably overriden by the name of the product's component, which explains why this problem only happens when listing components.
Reporter | ||
Comment 2•14 years ago
|
||
Marking as blocker for further investigation.
Flags: blocking4.0+
Flags: blocking3.6.2+
Target Milestone: --- → Bugzilla 3.6
Assignee | ||
Comment 3•14 years ago
|
||
I actually can't reproduce that warning. However, does this fix it for you?
Assignee: administration → mkanat
Status: NEW → ASSIGNED
Attachment #456208 -
Flags: review?(LpSolit)
Reporter | ||
Comment 4•14 years ago
|
||
Comment on attachment 456208 [details] [diff] [review] v1 It does, but now user IDs are displayed instead of login names.
Attachment #456208 -
Flags: review?(LpSolit) → review-
Reporter | ||
Comment 5•14 years ago
|
||
Comment on attachment 456208 [details] [diff] [review] v1 >+[% FOREACH my_component = product.components %] > [% overrides.initialowner.name.${component.name} = { > [% overrides.initialqacontact.name.${component.name} = { You forgot to replace component by my_component here too.
Assignee | ||
Comment 6•14 years ago
|
||
Ah, right. :-)
Attachment #456208 -
Attachment is obsolete: true
Attachment #456213 -
Flags: review?(LpSolit)
Reporter | ||
Comment 7•14 years ago
|
||
Comment on attachment 456213 [details] [diff] [review] v2 Now works fine. Thanks! r=LpSolit
Attachment #456213 -
Flags: review?(LpSolit) → review+
Reporter | ||
Updated•14 years ago
|
Flags: approval3.6+
Flags: approval+
Assignee | ||
Comment 8•14 years ago
|
||
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/ modified template/en/default/admin/components/list.html.tmpl Committed revision 7286. Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/3.6/ modified template/en/default/admin/components/list.html.tmpl Committed revision 7123.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•