I'm working on moving code from wiki.cgi into OpenGuides.pm. The main reason for this is to ease testing; it's something I've been wanting to do for a while. It does however mean that I'm going to make a developers release that you will all need to test out on your sites ASAP because it's quite a big change. I will wait a week between making the developers release available (which will be tonight, with any luck) and releasing it as a stable version. Any objections?
Kake
On Thu 10 Jun 2004, Kate L Pugh kake@earth.li wrote:
I'm working on moving code from wiki.cgi into OpenGuides.pm. The main reason for this is to ease testing; it's something I've been wanting to do for a while. It does however mean that I'm going to make a developers release that you will all need to test out on your sites ASAP because it's quite a big change.
I have done so. I've not done all the extracting yet, but I've got out what I needed and I want to move on to other tasks.
OpenGuides 0.33_02 has been sent to CPAN, but you can also get it from http://the.earth.li/~kake/code/OpenGuides-0.33_02.tar.gz
Please, please, please, download this and test it against your sites. Make sure to install the up-to-date templates, or merge any changes into your custom templates. The old templates *did* have bugs, and they're probably still in your custom ones.
If nobody finds any bugs by next Thursday then this is going *stable*, so please test *now*.
Kake
On Thu, Jun 10, 2004 at 11:31:12PM +0100, Kate L Pugh wrote:
Please, please, please, download this and test it against your sites. Make sure to install the up-to-date templates, or merge any changes into your custom templates. The old templates *did* have bugs, and they're probably still in your custom ones.
If nobody finds any bugs by next Thursday then this is going *stable*, so please test *now*.
I got the following error:
Can't locate object method "new" via package "CGI::Wiki::Plugin::GeoCache" (perhaps you forgot to load "CGI::Wiki::Plugin::GeoCache"?) at /usr/local/share/perl/5.6.1/OpenGuides.pm line 485.
Fixed by:
--- OpenGuides.pm.broken Fri Jun 11 12:57:59 2004 +++ OpenGuides.pm Fri Jun 11 13:05:37 2004 @@ -5,6 +5,7 @@ use CGI; use CGI::Wiki::Plugin::Diff; use CGI::Wiki::Plugin::Locator::UK; +use CGI::Wiki::Plugin::GeoCache; use OpenGuides::Template; use OpenGuides::Utils; use URI::Escape;
Dominic.
On Fri 11 Jun 2004, Dominic Hargreaves dom@earth.li wrote:
I got the following error:
Can't locate object method "new" via package "CGI::Wiki::Plugin::GeoCache" (perhaps you forgot to load "CGI::Wiki::Plugin::GeoCache"?) at /usr/local/share/perl/5.6.1/OpenGuides.pm line 485.
Good catch - I wonder why my testing didn't hit that. I've uploaded 0.33_03 and it's also here: http://the.earth.li/~kake/code/OpenGuides-0.33_03.tar.gz
Can people who haven't tested yet test this please.
People not running their own sites can help with the testing by poking around http://the.earth.li/~kake/cgi-bin/openguides/vegan-oxford.cgi and seeing if anything looks screwy.
Kake
On Fri, Jun 11, 2004 at 01:35:22PM +0100, Kate L Pugh wrote:
(now that I have DBD::SQLite installed for testing):
t/31_supersearch....................NOK 11# Failed test (t/31_supersearch.t at line 90) # 'Status: 302 Moved # location: http://example.com/wiki.cgi?Want_Pie_Now # # ' # doesn't match '(?-xism:Location: http://example.com/wiki.cgi%5C?Want_Pie_Now)' t/31_supersearch....................NOK 12# Failed test (t/31_supersearch.t at line 98) # 'Status: 302 Moved # location: http://example.com/wiki.cgi?Monkey # # ' # doesn't match '(?-xism:Location: http://example.com/wiki.cgi%5C?Monkey)' t/31_supersearch....................NOK 14# Failed test (t/31_supersearch.t at line 116) # 'Status: 302 Moved # location: http://example.com/wiki.cgi?Banana # # ' # doesn't match '(?-xism:Location: http://example.com/wiki.cgi%5C?Banana)' t/31_supersearch....................NOK 15# Failed test (t/31_supersearch.t at line 126) # 'Status: 302 Moved # location: http://example.com/wiki.cgi?Monkey_Brains # # ' # doesn't match '(?-xism:Location: http://example.com/wiki.cgi%5C?Monkey_Brains)' t/31_supersearch....................ok 16/16# Looks like you failed 4 tests of 16. t/31_supersearch....................dubious Test returned status 4 (wstat 1024, 0x400) DIED. FAILED tests 11-12, 14-15 Failed 4/16 tests, 75.00% okay
On Fri 11 Jun 2004, Dominic Hargreaves dom@earth.li wrote:
t/31_supersearch....................NOK 11# Failed test (t/31_supersearch.t at line 90) # 'Status: 302 Moved # location: http://example.com/wiki.cgi?Want_Pie_Now # # ' # doesn't match '(?-xism:Location: http://example.com/wiki.cgi%5C?Want_Pie_Now)'
This is a CGI.pm thing - older versions are using "location: " instead of "Location: ".
Now I think this is a bug in CGI.pm - HTTP headers are case-sensitive, right? And 2.90's changes does say "1. Fixed bug in redirect header handling."
So, what shall I do? Force people to use 2.90, or change the regexp in the test to accept "location: " as well as "Location: "? The former is correct, but the latter is less annoying.
Kake
On Fri, Jun 11, 2004 at 02:38:30PM +0100, Kate L Pugh wrote:
So, what shall I do? Force people to use 2.90, or change the regexp in the test to accept "location: " as well as "Location: "? The former is correct, but the latter is less annoying.
I'd prefer the latter, obviously :)
Is it possible to test for the version of CGI.pm and behave appropriately? That way at least the behaviour is documented in the code.
Cheers,
Dominic.
On Fri, Jun 11, 2004 at 02:38:30PM +0100, Kate L Pugh wrote:
So, what shall I do? Force people to use 2.90, or change the regexp in the test to accept "location: " as well as "Location: "? The former is correct, but the latter is less annoying.
On Fri 11 Jun 2004, Dominic Hargreaves dom@earth.li wrote:
Is it possible to test for the version of CGI.pm and behave appropriately? That way at least the behaviour is documented in the code.
I went for [lL]ocation and put a comment explaining why.
http://the.earth.li/~kake/code/OpenGuides-0.33_04.tar.gz
Kake
On Fri, Jun 11, 2004 at 03:14:31PM +0100, Kate L Pugh wrote:
More bugs:
- on visiting a node with a redirect: Undefined subroutine &OpenGuides::redirect_to_node called at /usr/local/share/perl/5.6.1/OpenGuides.pm line 156. I guess that routine needs moving out of wiki.cgi.
- action=index display is broken. It seems that criterion.url is set incorrectly; it misses out the "?", so http://www.ox.compsoc.net/oxfordguide/?Category_Activities becomes http://www.ox.compsoc.net/oxfordguide/Category_Activities (http://www.ox.compsoc.net/oxfordguide/?action=index;index_type=category;inde...)
Cheers,
Dominic.
On Sat 12 Jun 2004, Dominic Hargreaves dom@earth.li wrote:
on visiting a node with a redirect: Undefined subroutine &OpenGuides::redirect_to_node called at /usr/local/share/perl/5.6.1/OpenGuides.pm line 156. [...]
action=index display is broken. [...]
It's also missing a proper <title> tag.
All fixed in 0.33_05, thanks.
Kake
On Thu, Jun 10, 2004 at 11:31:12PM +0100, Kate L Pugh wrote:
Please, please, please, download this and test it against your sites. Make sure to install the up-to-date templates, or merge any changes into your custom templates. The old templates *did* have bugs, and they're probably still in your custom ones.
Attached is a trivial but handy script to keep track of your local modifications.
Cheers,
Dominic.
openguides-dev@lists.openguides.org