Closed
Bug 140674
Opened 24 years ago
Closed 24 years ago
documentation -> choose-product.html.tmpl fails on TT 2.07 with perl 5.005_02
Categories
(Bugzilla :: Documentation, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.16
People
(Reporter: afranke, Assigned: bz)
References
Details
Attachments
(5 files)
When enter_bug.cgi or describecomponents.cgi are called without a product, then
the choose-product page is shown. With TT 2.07 (as opposed to TT 2.06 which
works fine) the [% FOREACH p = proddesc.keys.sort %] loop doesn't seem to work.
The result is that only the first product is displayed correctly. For the
remaining products, the space is there, even the colon separating the product
name from the description, but everything else is missing.
| Reporter | ||
Comment 1•24 years ago
|
||
This is the cgi part of the testcase. It creates an array and a hash and passes
them to the template, namely global/bug.html.tmpl.
| Reporter | ||
Comment 2•24 years ago
|
||
The second part of the testcase -- used by ttbug.cgi .
For me, it prints something like this:
somearray = ARRAY(0x10dc20)
bar
foo
somehash = HASH(0xfffe0)
somehash.keys = ARRAY(0x52c438)
HASH(0x258c2c)
But instead of the last line with HASH(...) I had expected two lines:
foo
bar
| Reporter | ||
Comment 3•24 years ago
|
||
A workaround that made things better:
diff -r1.5 choose-product.html.tmpl
27c27
< [% FOREACH p = proddesc.keys.sort %]
---
> [% FOREACH p = proddesc_keys %]
and I added these lines in enter_bug.cgi and describecomponents.cgi right after
$vars->{'proddesc'} = \%products;
+ my @proddesc_keys = sort(keys(%products));
+ $::vars->{'proddesc_keys'} = \@proddesc_keys;
thus moving the computation of proddesc.keys.sort to the .cgis.
Comment 4•24 years ago
|
||
On IRC, it seems that the XS stash breaks with perl 5.00502. Without it, this
workarround isn't needed.
Andreas is going to mail the TT list, and then we'll probably relnote it for 2.16.
Target Milestone: --- → Bugzilla 2.16
| Reporter | ||
Comment 5•24 years ago
|
||
This is the output of gmake test if you answer yes to the first question about
XS Stash, but no to the second:
Do you want to build the XS Stash module? [y]
Do you want to use the XS Stash for all Templates? [y] n
| Reporter | ||
Comment 6•24 years ago
|
||
make test output as above, but answering yes to both XS Stash questions:
Do you want to build the XS Stash module? [y]
Do you want to use the XS Stash for all Templates? [y] y
| Reporter | ||
Comment 7•24 years ago
|
||
| Reporter | ||
Comment 8•24 years ago
|
||
As already noted above, the choose-product page only breaks if xs stash is
always used; if it is built but not always used, then the choose-product page
works fine in bugzilla. However, the testcase described in the first two
attachments of this bug seems to still hold in both cases. Maybe I haven't
tested thoroughly enough?
Comment 9•24 years ago
|
||
Your testcase behaves the same way for me on perl5.6.1, TT2.07 with the XS stash.
I'm a bit consfused about that - it looks like it should be right. Gerv? Myk?
Whats wrong with andrea's test case.
When mailing to the list, you should use the simpler one which failed with the
stash, but not without.
Comment 10•24 years ago
|
||
There is a bug in Andreas' test case.
> my %somehash = {foo => 'bar', bar => 'baz'};
This is not the way to create a hash. This creates a reference to an anonymous
hash, and assigns it to the hash value. This causes the following error in your
httpd log:
[Sun Apr 28 23:38:28 2002] ttbug.cgi: Reference found where even-sized list
expected at /var/www/html/bugzilla/ttbug.cgi line 14.
What you wanted was:
my %somehash = (foo => 'bar', bar => 'baz');
(Note round brackets.) With this change, the test case appears as Andreas
expects it to. So I'm not quite sure what the problem is - although my
choose-product page, with 2.07, Y said to everything at install time, and
compiled templates, works fine.
Gerv
Comment 11•24 years ago
|
||
Doh. Knew something was wrong ;) Theres still obviously several 2.07 XS bugs
with perl 5.005_02, from the test results.
Keywords: relnote
Comment 12•24 years ago
|
||
What's our minimum required Perl version? And can we bump it?
Gerv
| Reporter | ||
Comment 13•24 years ago
|
||
Sorry for the wrong testcase. I should refrain from copy and paste without
knowing what I'm doing.
I think the minimum perl version is currently just plain 5.005. I'm using _02.
If you bump it, please tell me where I can get precompiled binaries for use on
our solaris 2.6 machine (which has a C/C++ compiler environment that is probably
too broken to compile a perl source distribution).
Comment 14•24 years ago
|
||
You can get Perl binaries (and other binaries) for Solaris here:
http://sunfreeware.com/
We should deprecate 5.005 and recommend installations not use the XS stash with it.
| Reporter | ||
Comment 15•24 years ago
|
||
Thanks for the pointer. I managed to download perl-5.6.1 from there, but now I
have to ask our admin to install it before being able to try it out myself:
From http://sunfreeware.com/download.html:
> The pkgadd command must be run as root.
Well, if there's no other way, then I'll bite the bullet... unfortunately, in
our case, /usr/local does not have much free disk space, so this may not work at
all...
Comment 16•24 years ago
|
||
There is another way: use the regular stash instead of the XS stash. Perl 5.005
should work fine with the regular stash (at least, there haven't been any
reports of it not working). Note, however, that you may run into more problems
with 5.005, in the future if not now.
Comment 17•24 years ago
|
||
So this is a release note matter?
"Perl version 5.005 and up are supported. However, 5.005_x is deprecated and
will not work with future releases; in addition, there are known bugs using the
high-speed XS Stash of the Template Toolkit with 5.005. Please use the regular
stash. You are asked which stash you want to use at installation time."
Plus a note in the installation instructions next to the Perl section.
Gerv
Comment 18•24 years ago
|
||
release notes -> Matty
Comment 19•24 years ago
|
||
mattyt fixed this in the last update:
- It is recommended you use the high speed XS Stash of the Template
Toolkit, in order to achieve best performance. However, there are
known problems with XS Stash and Perl 5.005_02 and lower. If you
wish to use these older versions of Perl, please use the regular
stash. You are asked which stash you want to use at Template Toolkit
installation time.
(bug 140674)
If thats all, then this bug can be marked as fixed. Are we planning to deprecate
perl < 5.6, though? andreas' post to the tt list didn't get any responses yet...
Comment 20•24 years ago
|
||
Right, sorry. I didn't close this because Gerv wanted a note in the
"installation instructions" which I assume refers to the Guide.
Comment 21•24 years ago
|
||
I was being vague; but I think we should note this in the bit of text an admin
will be reading when they install TT - i.e. the TT section of the installation
notes in the Guide.
Gerv
Updated•24 years ago
|
Summary: choose-product.html.tmpl fails on TT 2.07 with perl 5.005_02 → 2.16 release notes -> choose-product.html.tmpl fails on TT 2.07 with perl 5.005_02
Comment 22•24 years ago
|
||
Not my problem anymore
Assignee: matty → mbarnson
Component: Bugzilla-General → Documentation
QA Contact: justdave → matty
Updated•24 years ago
|
Summary: 2.16 release notes -> choose-product.html.tmpl fails on TT 2.07 with perl 5.005_02 → documentation -> choose-product.html.tmpl fails on TT 2.07 with perl 5.005_02
| Assignee | ||
Comment 23•24 years ago
|
||
OK, anybody willing to volunteer to proofread the TT instructions in the Guide
once I get them in? I'm no expert, and haven't actually installed a new version
of bugzilla in nearly a year, so I'll be going off the descriptions I read here.
Status: NEW → ASSIGNED
Comment 24•24 years ago
|
||
Fixed in my local copy, to be checked in today.
Gerv
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•