recently fixed bugs
I have a problem where pages within the rendered wiki become empty. The headers, footers, and sidepanel are there, but the body is completely missing. If I do a webedit and change anything (adding whitespace is enough) and commiting the change updates the page and the body appears. If I then do a rebuild of the wiki from the command line, I get the blank pages again. I have debug turned up but I don't see anything that makes me suspect anything. When I do a rebuild from the command line I get the following warning.
Use of uninitialized value in substitution (s///) at /usr/share/perl5/IkiWiki/Plugin/inline.pm line 234.
The odd thing is that I have 5 other wikis on this same system and none of them seem to be experiencing the same problems. The only difference seems to be the use of sidebars and google calendar in the affected wiki.
Could you post a tarball of the wiki and any setup file you use somewhere so I can try to reproduce your problem? --Joey
The Wiki I think it has something to do with the plugin selection. --ScottHenson
Ok, I built your wiki, and got no contentless pages here. I also didn't see the uninitialized value warning, which could be connected. However, I that uninitialized value come from an inline directive, and the wiki source doesn't seem to use inlining at all, so I'm confused about that. --Joey
Sorry, thats my fault. The wiki that was having the problem had some information that I couldn't distribute. So I reproduced the bug on another wiki and sent you that. Those warnings don't seem to have any effect on the disappearing content. Sorry for the confusion. --ScottHenson
That's ok, but since I couldn't reproduce it with the data you sent, I can't really fix it. --Joey
Can you not reproduce the warning or not reproduce the disappearing pages? The warning does not seem to have anything to do with the error of the disappearing pages. --ScottHenson
I can't reproduce any disappearing text. --Joey
Marking this unreproducible. --Joey
Posted Sun Feb 10 23:46:47 2008Having read i18ncharactersinposttitle, I have a page named St John's
in a file named St_John__39__s.mdwn
. Regular wikilinks like [[St_John's]]
successfully point to that page. However, if I tag a page with [[tag St_John's]]
, that link is shown as pointing to a non-existant page. Modify the tag to read [[tag St_John__39__s]]
works around the problem.
done in 1.49 --Joey
Posted Sun Feb 10 23:46:47 2008If you
- Add a link to a non-existant page and save. (e.g. somewhere-over-the-rainbow)
- Click the question mark to create the page.
- Click the cancel button.
You get a 404 as the page doesn't exist. This patch redirects to the from location if it is known.
=== modified file 'IkiWiki/CGI.pm'
--- IkiWiki/CGI.pm
+++ IkiWiki/CGI.pm
@@ -427,7 +427,11 @@
}
if ($form->submitted eq "Cancel") {
- redirect($q, "$config{url}/".htmlpage($page));
+ if ( $newpage && defined $from ) {
+ redirect($q, "$config{url}/".htmlpage($from));
+ } else {
+ redirect($q, "$config{url}/".htmlpage($page));
+ }
return;
}
elsif ($form->submitted eq "Preview") {
I think you mean to use
$newfile
? I've applied a modieid version that also deal with creating a new page with no defined $from location. done --JoeyYes of course, that's what I get for submitting an untested patch! I must stop doing that.
[P.S. just above that is
$type=$form->param('type');
if (defined $type && length $type && $hooks{htmlize}{$type}) {
$type=possibly_foolish_untaint($type);
}
....
$file=$page.".".$type;
I'm a little worried by the possibly_foolish_untaint
(good name for it by the way,
makes it stick out). I don't think much can be done to exploit this (if anything),
but it seems like you could have a very strict regex there rather than the untaint,
is there aren't going to be many possible extensions. Something like /(.\w+)+/
(groups of dot separated alpha-num chars if my perl-foo isn't failing me). You could
at least exclude /
and ..
. I'm happy to turn this in to a patch if you agree.]
Posted Sun Feb 10 23:46:47 2008The reason it's safe to use
possibly_foolish_untaint
here is because of the check for $hooks{htmlize}{$type}. This limits it to types that have a registered htmlize hook (mdwn, etc), and not whatever random garbage an attacker might try to put in. If it wasn't for that check, usingpossibly_foolish_untaint
there would be very foolish indeed.. --JoeyNice, sorry I missed it. I must say thankyou for creating ikiwiki. The more I look at it, the more I admire what you are doing with it and how you are going about it
Since at least version 2.0 (and certainly a few version before), it seems that the pagestats plugin is broken : each matched page has a count of 2. This is also (of course) producing flat tag cloud.
My perl knowledge is very limited, but the call :
my @bl = IkiWiki::backlinks($page);
$counts{$page} = scalar(@bl);
return allways 2, which seems to me "obvious", because the backlinks() function is returning two array of links...
Patch is :
--- /usr/share/perl5/IkiWiki/Plugin/pagestats.pm 2007-04-27 04:33:43.000000000 +0200
+++ ./pagestats.pm 2007-05-12 16:47:14.000000000 +0200
@@ -36,7 +36,7 @@
if (pagespec_match($page, $params{pages}, location => $params{page})) {
use IkiWiki::Render;
my @bl = IkiWiki::backlinks($page);
- $counts{$page} = scalar(@bl);
+ $counts{$page} = scalar(@{$bl[0]})+scalar(@{$bl[1]});
$max = $counts{$page} if $counts{$page} > $max;
}
}
--hb
thanks, done --Joey
Posted Sun Feb 10 23:46:47 2008- The URL is rewritten to http://cvs.savannah.gnu.org/viewvc/gnumach/ddb%2Fdb%5Fexpr%2Eh?view=log&root=hurd&pathrev=gnumach-1-branch, which the remove server doesn't like. Mind the esacping of [^A-Za-z0-9]. Might this be a problem of the web server?
Also, I'd like to put the shortcut usages into backticks
-- <a href="http://ikiwiki.info/shortcuts/">shortcuts</a>
--
to have them displayed in the usual backtick-formatting.
That also doesn't work, but this is an already-reported issue, as far as I know.
Posted Sun Feb 10 23:46:47 2008The encoding of the shortcut text is done so that a shortcut can have spaces in it etc and they're converted into a valid url. As in the example of a shortcut to the wikipedia page for "War of 1812" (although the example puts underscores in, it should also work without them).
I suspect that if I dropped the endoding of characters other than space and maybe plus, it would break some shortcuts though. Consider a shortcut used to do a google search for "foo&bar". You want to encode the "&" in that search, otherwise google will search for just foo!
It does seem to be partly a web server problem, since savannah's viewvc doesn't decode the escaped characters in the path string.
I could add a %S that is not escaped, and leave %s escaped.. --Joey
done
Joey, I have a problem with translating of Discussion link in my backport of ikiwiki 1.38.
I've just noticed that it's not translated after page update. In syslog
I can see English ikiwiki messages. It's a strange, but the problem
doesn't occur if I rebuild all my ikiwiki pages via command line
(ikiwki --setup ikiwiki.setup
). In syslog I can see Polish messages then.
Unfortunately I don't know another Polish user of ikiwiki, so I can't ask him to confirm the problem. Maybe Victor Moral can do it? Probably he uses ikiwiki with him Spanish translation.
--Paweł
Posted Sun Feb 10 23:46:47 2008Well, do you have your setup file configured to use a polish locale? --Joey
Now I have
I've just generated pl_PL.UTF-8 locale via
dpkg-reconfigure locales
and set locale hash to 'pl_PL.UTF-8' in myikiwiki.setup
file. I also ranikiwiki --setup ikiwiki.setup
and restarted my Apache2 server. Unfortunately, I can still see "Discussion" link instead of "Dyskusja" link after any page update via WWW. --PawełA setlocale issue. Now done --Joey
I can confirm. Now it works
Thanks a lot for the fix! --Paweł
open (IN, "$config{wikistatedir}/aggregate" ||
die "$config{wikistatedir}/aggregate: $!");
It looks like the intent was "open this file, and die if you can't",
but I'm pretty sure it actually means "open this file and ignore errors
silently". Shouldn't this be open(IN, $file) || die "$file: $!";
(i.e. with the parens before the call to die
)? --Ethan
Posted Sun Feb 10 23:46:47 2008Thanks, done --Joey
I ran into a problem when installing from svn. I got "invalid variable interpolation" errors for Wrappers.pm. I added the flag '--extract-all' to 'po/Makefile' and 'po/t' to the xgettext line. Once I did that I was able to make and make test just fine. --HarleyPig
It would be helpful if you could post the actual error message you saw. Also would be nice to know what versions of perl and gettext you have. Perhaps your xgettext is an older version from before it natively supported perl. Adding --extract-all doesn't seem like a good idea, since this causes it to treat every string in the entire wiki as translatable. I don't know what you're talking about regarding 'po/t'. --Joey
make[1]: Entering directory
/home/www/ikiwiki/po' Rebuilding the pot file xgettext ../IkiWiki/CGI.pm ../IkiWiki/Plugin/aggregate.pm ../IkiWiki/Plugin/brokenlinks.pm ../IkiWiki/Plugin/camelcase.pm ../IkiWiki/Plugin/ddate.pm ../IkiWiki/Plugin/favicon.pm ../IkiWiki/Plugin/fortune.pm ../IkiWiki/Plugin/goodstuff.pm ../IkiWiki/Plugin/googlecalendar.pm ../IkiWiki/Plugin/haiku.pm ../IkiWiki/Plugin/html.pm ../IkiWiki/Plugin/htmlscrubber.pm ../IkiWiki/Plugin/htmltidy.pm ../IkiWiki/Plugin/httpauth.pm ../IkiWiki/Plugin/img.pm ../IkiWiki/Plugin/inline.pm ../IkiWiki/Plugin/linkmap.pm ../IkiWiki/Plugin/map.pm ../IkiWiki/Plugin/mdwn.pm ../IkiWiki/Plugin/meta.pm ../IkiWiki/Plugin/mirrorlist.pm ../IkiWiki/Plugin/openid.pm ../IkiWiki/Plugin/orphans.pm ../IkiWiki/Plugin/otl.pm ../IkiWiki/Plugin/pagecount.pm ../IkiWiki/Plugin/pagestats.pm ../IkiWiki/Plugin/passwordauth.pm ../IkiWiki/Plugin/poll.pm ../IkiWiki/Plugin/polygen.pm ../IkiWiki/Plugin/rawhtml.pm ../IkiWiki/Plugin/rst.pm ../IkiWiki/Plugin/search.pm ../IkiWiki/Plugin/shortcut.pm ../IkiWiki/Plugin/sidebar.pm ../IkiWiki/Plugin/skeleton.pm ../IkiWiki/Plugin/smiley.pm ../IkiWiki/Plugin/tag.pm ../IkiWiki/Plugin/template.pm ../IkiWiki/Plugin/textile.pm ../IkiWiki/Plugin/toc.pm ../IkiWiki/Plugin/toggle.pm ../IkiWiki/Plugin/typography.pm ../IkiWiki/Plugin/wikitext.pm ../IkiWiki/Rcs/Stub.pm ../IkiWiki/Rcs/git.pm ../IkiWiki/Rcs/mercurial.pm ../IkiWiki/Rcs/svn.pm ../IkiWiki/Rcs/tla.pm ../IkiWiki/Render.pm ../IkiWiki/Setup.pm ../IkiWiki/Setup/Standard.pm ../IkiWiki/UserInfo.pm ../IkiWiki/Wrapper.pm ../ikiwiki.in ../IkiWiki.pm -o ikiwiki.pot -Lperl --add-comments=translators ../IkiWiki/Wrapper.pm:64: invalid variable interpolation at "$" make[1]: *** [ikiwiki.pot] Error 1 make[1]: Leaving directory
/home/www/ikiwiki/po' make: * [extra_build] Error 2harleypig ikiwiki # xgettext --version
xgettext (GNU gettext-tools) 0.15
harleypig ikiwiki # perl -v
This is perl, v5.8.8 built for i686-linux
Sorry about the po/t report ... it was the test file I used to figure out what was wrong and I forgot to remove it. This is against the subversion repository, version 2338. The referenced line has a $! variable, which the documentation for gettext indicates is the problem.
Ok, I think that you need to upgrade xgettext to 0.16. However, there's no reason why you should need to rebuild the pot file anyway, so I've checked it into svn, and that's one problem done.
FWIW, I get the same error when building manually from SVN trunk on Ubuntu Edgy. I'm also using xgettext 0.15, because it's the latest version that's in the repos. However, I don't think that's the sole problem because I can build fine on another (Debian) box which is running 0.14.4... I know very little about
gettext
, but could this be related to my language settings? On the Edgy box I haveLANGUAGE=en_GB:en
andLANG=en_GB.UTF-8
. Theikiwiki
package installs on Edgy with no problems. --BenYou'll only see the problem if it needs to rebuild po/ikiwiki.pot, which it generally doesn't if you're just building the package. If you edit files and build, it will rebuilt the pot and then fail with older gettexts. --Joey
I guess I'm confused then, because I do get that error when I just build.
To reproduce:
svn co svn://ikiwiki.kitenet.net/ikiwiki/trunk ikiwiki
cd ikiwiki
perl Makefile.PL
make
Then I see:
./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man ./mdwn2man ikiwiki-mass-rebuild 8 doc/ikiwiki-mass-rebuild.mdwn > ikiwiki-mass-rebuild.man ./pm_filter /usr/local 1.44 /usr/local/share/perl/5.8.8 < ikiwiki.in > ikiwiki.out make -C po make[1]: Entering directory `/home/ben/tmp/ikiwiki/po' Rebuilding the pot file xgettext ../IkiWiki/CGI.pm ../IkiWiki/Plugin/aggregate.pm ../IkiWiki/Plugin/anonok.pm ../IkiWiki/Plugin/brokenlinks.pm ../IkiWiki/Plugin/camelcase.pm ../IkiWiki/Plugin/conditional.pm ../IkiWiki/Plugin/ddate.pm ../IkiWiki/Plugin/favicon.pm ../IkiWiki/Plugin/fortune.pm ../IkiWiki/Plugin/goodstuff.pm ../IkiWiki/Plugin/googlecalendar.pm ../IkiWiki/Plugin/haiku.pm ../IkiWiki/Plugin/html.pm ../IkiWiki/Plugin/htmlscrubber.pm ../IkiWiki/Plugin/htmltidy.pm ../IkiWiki/Plugin/httpauth.pm ../IkiWiki/Plugin/img.pm ../IkiWiki/Plugin/inline.pm ../IkiWiki/Plugin/linkmap.pm ../IkiWiki/Plugin/lockedit.pm ../IkiWiki/Plugin/map.pm ../IkiWiki/Plugin/mdwn.pm ../IkiWiki/Plugin/meta.pm ../IkiWiki/Plugin/mirrorlist.pm ../IkiWiki/Plugin/more.pm ../IkiWiki/Plugin/opendiscussion.pm ../IkiWiki/Plugin/openid.pm ../IkiWiki/Plugin/orphans.pm ../IkiWiki/Plugin/otl.pm ../IkiWiki/Plugin/pagecount.pm ../IkiWiki/Plugin/pagestats.pm ../IkiWiki/Plugin/passwordauth.pm ../IkiWiki/Plugin/poll.pm ../IkiWiki/Plugin/polygen.pm ../IkiWiki/Plugin/prettydate.pm ../IkiWiki/Plugin/rawhtml.pm ../IkiWiki/Plugin/rst.pm ../IkiWiki/Plugin/search.pm ../IkiWiki/Plugin/shortcut.pm ../IkiWiki/Plugin/sidebar.pm ../IkiWiki/Plugin/signinedit.pm ../IkiWiki/Plugin/skeleton.pm ../IkiWiki/Plugin/smiley.pm ../IkiWiki/Plugin/tag.pm ../IkiWiki/Plugin/template.pm ../IkiWiki/Plugin/textile.pm ../IkiWiki/Plugin/toc.pm ../IkiWiki/Plugin/toggle.pm ../IkiWiki/Plugin/typography.pm ../IkiWiki/Plugin/wikitext.pm ../IkiWiki/Rcs/Stub.pm ../IkiWiki/Rcs/git.pm ../IkiWiki/Rcs/mercurial.pm ../IkiWiki/Rcs/svn.pm ../IkiWiki/Rcs/tla.pm ../IkiWiki/Render.pm ../IkiWiki/Setup.pm ../IkiWiki/Setup/Standard.pm ../IkiWiki/UserInfo.pm ../IkiWiki/Wrapper.pm ../ikiwiki.in ../IkiWiki.pm -o ikiwiki.pot -Lperl --add-comments=translators ../IkiWiki/Wrapper.pm:64: invalid variable interpolation at "$" make[1]: *** [ikiwiki.pot] Error 1 make[1]: Leaving directory `/home/ben/tmp/ikiwiki/po' make: *** [extra_build] Error 2
Posted Sun Feb 10 23:46:47 2008Other than installing a newer version of
gettext
from outside of the repos, is there any workaround?It's probably because you're pulling it from svn, and I don't always update the pot file every time I commit to svn. So this will affect svn checkouts, but not released tarballs. Anyway, I put in a workaround.. done --Joey
I installed version 1.48-1 of Debian package of ikiwiki. When I went to login with an OpenID URL it told me I was missing the Net::OpenID::Consumer Perl module which in turn required the Crypt::DH module.
I assume that these should be pulled in by default since OpenID is enabled by default?
-- Adam.
Posted Sun Feb 10 23:46:47 2008I'm going to promote it from a Suggests to a Recommends, that should get it installed by default and still let it not be installed by users who don't want it. done --Joey
I edited some pages on the ikiwiki ikiwiki (shortcuts and ikiwikiusers). The edits show up in RecentChanges and History, but not in the compiled pages. --JoshTriplett
Well, I seem to have fixed this now (crossed fingers) --Joey
Looks fixed. Out of curiosity, what caused the problem? --JoshTriplett
Looks like a build died halfway through, so it was stumbling over rendered html pages that it didn't have record of. I don't know what build failed exactly. --Joey
Posted Sun Feb 10 23:46:47 2008Has this just happened again? datearchives-plugin is now exhibiting the same symptoms -- it's in the repository and RecentChanges, but the actual page is 404. --Ben
Yes, it seems to have happened again. Added debugging to track it down next time it occurs. It seems to be happening when you add things to patchqueue. --Joey
Got it, it seems that htperestradier was dying and this was killing ikiwiki before it could save state filed && done, for real this time. --Joey