From 8af8d085d676d940478e45e852f06d4eec2485f8 Mon Sep 17 00:00:00 2001 From: joey Date: Sat, 2 Dec 2006 00:19:55 +0000 Subject: * The hack used to make the pagetemplate hook have access to the editpage template won't work with CGI::FormBuilder 3.0401, so disable it for now. * CGI::FormBuilder 3.0401 seems to work ok now with ikiwiki, although there might still be bugs lurking.. --- IkiWiki/CGI.pm | 12 +++--------- debian/changelog | 6 +++++- doc/bugs/Problems_using_cygwin.mdwn | 3 +++ doc/bugs/formbuilder_3.0401_broken.mdwn | 4 ++++ doc/install.mdwn | 3 +-- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 3e324ae1c..d00de740a 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -274,15 +274,8 @@ sub cgi_editpage ($$) { #{{{ my @fields=qw(do rcsinfo subpage from page type editcontent comments); my @buttons=("Save Page", "Preview", "Cancel"); - eval q{use CGI::FormBuilder; use CGI::FormBuilder::Template::HTML}; + eval q{use CGI::FormBuilder}; error($@) if $@; - my $renderer=CGI::FormBuilder::Template::HTML->new( - fields => \@fields, - template_params("editpage.tmpl"), - ); - run_hooks(pagetemplate => sub { - shift->(page => "", destpage => "", template => $renderer->engine); - }); my $form = CGI::FormBuilder->new( fields => \@fields, header => 1, @@ -296,7 +289,8 @@ sub cgi_editpage ($$) { #{{{ params => $q, action => $config{cgiurl}, table => 0, - template => $renderer, + template => (-e "$config{templatedir}/editpage.tmpl" ? + {template_params("editpage.tmpl")} : ""), ); run_hooks(formbuilder_setup => sub { diff --git a/debian/changelog b/debian/changelog index 0bae7aae9..2a1e9e219 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,12 @@ ikiwiki (1.34.3) UNRELEASED; urgency=low * Fix daemonisation code to only do daemon setup things after forking the child process. + * The hack used to make the pagetemplate hook have access to the editpage + template won't work with CGI::FormBuilder 3.0401, so disable it for now. + * CGI::FormBuilder 3.0401 seems to work ok now with ikiwiki, although + there might still be bugs lurking.. - -- Joey Hess Fri, 1 Dec 2006 19:11:32 -0500 + -- Joey Hess Fri, 1 Dec 2006 19:14:36 -0500 ikiwiki (1.34.2) unstable; urgency=low diff --git a/doc/bugs/Problems_using_cygwin.mdwn b/doc/bugs/Problems_using_cygwin.mdwn index 66cd3f105..9a49e2587 100644 --- a/doc/bugs/Problems_using_cygwin.mdwn +++ b/doc/bugs/Problems_using_cygwin.mdwn @@ -15,3 +15,6 @@ A different problem has reared its ugly head. When I click on "RecentChanges", Indeed there is no such routine IkiWiki::XMLin(). I don't understand how this can possibly work -- as it manifestly does on linux. > XMLin is supposed to be exported by XML::Simple. My guess is that, due to a missing error check, XML::Simple is failing to load, and it's not aborting then. You probably need to install that module; in the meantime, I've fixed the missing error check in svn. --[[Joey]] + + +[[bugs/done]] diff --git a/doc/bugs/formbuilder_3.0401_broken.mdwn b/doc/bugs/formbuilder_3.0401_broken.mdwn index 8e5126bf6..7e1df24e0 100644 --- a/doc/bugs/formbuilder_3.0401_broken.mdwn +++ b/doc/bugs/formbuilder_3.0401_broken.mdwn @@ -67,3 +67,7 @@ Nasty, but it should work. I haven't fully installed the new version of CGI::FormBuilder to test it, and it's quite possible that other changes in the new version cause other breakage. If you want to test the fix, it's in svn now. --[[Joey]] + +Now that the new version of formbuilder is in debian unstable, I'm using +ikiwiki with it, and, after fixing a bug or two more, I think it's all +working, so I'll call this bug [[bugs/done]]. --[[Joey]] diff --git a/doc/install.mdwn b/doc/install.mdwn index ed6d499c5..38db23356 100644 --- a/doc/install.mdwn +++ b/doc/install.mdwn @@ -8,8 +8,7 @@ Ikiwiki is a perl program, and needs a recent version of perl such as Ikiwiki requires the [[cpan Text::MarkDown]], [[cpan URI]] and [[cpan HTML::Parser]] perl modules be installed, and also uses the following perl modules if available: -[[cpan CGI::Session]], [[cpan CGI::FormBuilder]] (version 3.02.02 or newer, -but 3.0401 might be broken), +[[cpan CGI::Session]], [[cpan CGI::FormBuilder]] (version 3.02.02 or newer), [[cpan HTML::Template]], [[cpan Mail::Sendmail]], [[cpan Time::Duration]] [[cpan TimeDate]], [[cpan HTML::Scrubber]], [[cpan RPC::XML]], [[cpan XML::Simple]], [[cpan XML::Feed]], [[cpan File::MimeInfo]]. -- cgit v1.2.3