From: Joey Hess Date: Sun, 23 Jun 2013 18:04:42 +0000 (-0400) Subject: Merge branch 'restrict-comment-formats' of git://rtime.felk.cvut.cz/sojka/ikiwiki X-Git-Tag: 3.20130710~32 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/5038f36cba2c7db223708d06a65f99b08c25b733?hp=c42fd7d7580d081f3e3f624fd74219b0435230f6 Merge branch 'restrict-comment-formats' of git://rtime.felk.cvut.cz/sojka/ikiwiki --- diff --git a/.gitignore b/.gitignore index fe1c3d441..f8991a63d 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ ikiwiki.out ikiwiki-transition.out ikiwiki-calendar.out pm_to_blib +/MYMETA.yml *.man /po/cover_db po/po2wiki_stamp diff --git a/IkiWiki.pm b/IkiWiki.pm index f68797ae3..0570c8bc5 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -118,6 +118,22 @@ sub getsetup () { safe => 0, rebuild => 0, }, + cgi_overload_delay => { + type => "string", + default => '', + example => "10", + description => "number of seconds to delay CGI requests when overloaded", + safe => 1, + rebuild => 0, + }, + cgi_overload_message => { + type => "string", + default => '', + example => "Please wait", + description => "message to display when overloaded (may contain html)", + safe => 1, + rebuild => 0, + }, rcs => { type => "string", default => '', @@ -1417,7 +1433,7 @@ sub preprocess ($$$;$$) { # consider it significant. my @params; while ($params =~ m{ - (?:([-\w]+)=)? # 1: named parameter key? + (?:([-.\w]+)=)? # 1: named parameter key? (?: """(.*?)""" # 2: triple-quoted value | @@ -1514,7 +1530,7 @@ sub preprocess ($$$;$$) { ( # 4: the parameters.. \s+ # Must have space if parameters present (?: - (?:[-\w]+=)? # named parameter key? + (?:[-.\w]+=)? # named parameter key? (?: """.*?""" # triple-quoted value | @@ -1542,7 +1558,7 @@ sub preprocess ($$$;$$) { \s+ ( # 4: the parameters.. (?: - (?:[-\w]+=)? # named parameter key? + (?:[-.\w]+=)? # named parameter key? (?: """.*?""" # triple-quoted value | diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm index 83bd670cb..89da5c453 100644 --- a/IkiWiki/Plugin/aggregate.pm +++ b/IkiWiki/Plugin/aggregate.pm @@ -113,8 +113,7 @@ sub launchaggregation () { my @feeds=needsaggregate(); return unless @feeds; if (! lockaggregate()) { - debug("an aggregation process is already running"); - return; + error("an aggregation process is already running"); } # force a later rebuild of source pages $IkiWiki::forcerebuild{$_->{sourcepage}}=1 diff --git a/IkiWiki/Plugin/blogspam.pm b/IkiWiki/Plugin/blogspam.pm index d32c2f169..e48ed729f 100644 --- a/IkiWiki/Plugin/blogspam.pm +++ b/IkiWiki/Plugin/blogspam.pm @@ -53,6 +53,7 @@ sub checkconfig () { eval q{ use RPC::XML; use RPC::XML::Client; + $RPC::XML::ENCODING = 'utf-8'; }; error $@ if $@; } diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm index 72552abcc..99a07d2c0 100644 --- a/IkiWiki/Plugin/bzr.pm +++ b/IkiWiki/Plugin/bzr.pm @@ -195,7 +195,7 @@ sub rcs_add ($) { sub rcs_remove ($) { my ($file) = @_; - my @cmdline = ("bzr", "rm", "--force", "--quiet", "$config{srcdir}/$file"); + my @cmdline = ("bzr", "rm", "--quiet", "$config{srcdir}/$file"); if (system(@cmdline) != 0) { warn "'@cmdline' failed: $!"; } diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 151e839d0..1ef79a27a 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -460,10 +460,7 @@ sub editcomment ($$) { $content .= " nickname=\"$nickname\"\n"; } elsif (defined $session->remote_addr()) { - my $ip = $session->remote_addr(); - if ($ip =~ m/^([.0-9]+)$/) { - $content .= " ip=\"$1\"\n"; - } + $content .= " ip=\"".$session->remote_addr()."\"\n"; } if ($config{comments_allowauthor}) { diff --git a/IkiWiki/Plugin/cvs.pm b/IkiWiki/Plugin/cvs.pm index 788f51167..841aec914 100644 --- a/IkiWiki/Plugin/cvs.pm +++ b/IkiWiki/Plugin/cvs.pm @@ -216,14 +216,12 @@ sub rcs_add ($) { while ($file = pop @files_to_add) { if (@files_to_add == 0) { - # file cvs_runcvs('add', cvs_keyword_subst_args($file)) || - warn("cvs add $file failed\n"); + warn("cvs add file $file failed\n"); } else { - # directory cvs_runcvs('add', $file) || - warn("cvs add $file failed\n"); + warn("cvs add dir $file failed\n"); } } } @@ -316,7 +314,9 @@ sub rcs_recentchanges ($) { $oldrev =~ s/INITIAL/0/; $newrev =~ s/\(DEAD\)//; my $diffurl = defined $config{diffurl} ? $config{diffurl} : ""; - my $epage = uri_escape_utf8($page); + my $epage = join('/', + map { uri_escape_utf8($_) } split('/', $page) + ); $diffurl=~s/\[\[file\]\]/$epage/g; $diffurl=~s/\[\[r1\]\]/$oldrev/g; $diffurl=~s/\[\[r2\]\]/$newrev/g; @@ -396,11 +396,15 @@ sub rcs_diff ($;$) { my @cvsps = `env TZ=UTC cvsps -q --cvs-direct -z 30 -g -s $rev`; my $blank_lines_seen = 0; + # skip log, get to the diff while (my $line = shift @cvsps) { $blank_lines_seen++ if ($line =~ /^$/); last if $blank_lines_seen == 2; } + @cvsps = @cvsps[0..$maxlines-1] + if defined $maxlines && @cvsps > $maxlines; + if (wantarray) { return @cvsps; } @@ -491,24 +495,53 @@ sub cvs_keyword_subst_args ($) { my $filemime = File::MimeInfo::default($file); # if (-T $file) { - if (defined($filemime) && $filemime eq 'text/plain') { - return ($file); - } - else { - return ('-kb', $file); - } + defined($filemime) && $filemime eq 'text/plain' + ? return ('-kkv', $file) + : return ('-kb', $file); } sub cvs_runcvs(@) { my @cmd = @_; unshift @cmd, 'cvs', '-Q'; - local $CWD = $config{srcdir}; + # CVS can't operate outside a srcdir, so we're always setting $CWD. + # "local $CWD" restores the previous value when we go out of scope. + # Usually that's correct. But if we're removing the last file from + # a directory, the post-commit hook will exec in a working directory + # that's about to not exist (CVS will prune it). + # + # chdir() manually here, so we can selectively not chdir() back. + + my $oldcwd = $CWD; + chdir($config{srcdir}); + + eval q{ + use IPC::Open3; + use Symbol qw(gensym); + use IO::File; + }; + error($@) if $@; + + my $cvsout = ''; + my $cvserr = ''; + local *CATCHERR = IO::File->new_tmpfile; + my $pid = open3(gensym(), \*CATCHOUT, ">&CATCHERR", @cmd); + while (my $l = ) { + $cvsout .= $l + unless 1; + } + waitpid($pid, 0); + my $ret = $? >> 8; + seek CATCHERR, 0, 0; + while (my $l = ) { + $cvserr .= $l + unless $l =~ /^cvs commit: changing keyword expansion /; + } + + print STDOUT $cvsout; + print STDERR $cvserr; - open(my $savedout, ">&STDOUT"); - open(STDOUT, ">", "/dev/null"); - my $ret = system(@cmd); - open(STDOUT, ">&", $savedout); + chdir($oldcwd) if -d $oldcwd; return ($ret == 0) ? 1 : 0; } diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm index 061242fd8..c7f1e4fa7 100644 --- a/IkiWiki/Plugin/edittemplate.pm +++ b/IkiWiki/Plugin/edittemplate.pm @@ -132,7 +132,7 @@ sub filltemplate ($$) { if ($@) { # Indicate that the earlier preprocessor directive set # up a template that doesn't work. - return "[[!pagetemplate ".gettext("failed to process template:")." $@]]"; + return "[[!edittemplate ".gettext("failed to process template:")." $@]]"; } $template->param(name => $page); diff --git a/IkiWiki/Plugin/filecheck.pm b/IkiWiki/Plugin/filecheck.pm index 9992f2c26..cdea5c706 100644 --- a/IkiWiki/Plugin/filecheck.pm +++ b/IkiWiki/Plugin/filecheck.pm @@ -139,7 +139,7 @@ sub match_mimetype ($$;@) { my $mimeinfo_ok=! $@; my $mimetype; if ($mimeinfo_ok) { - my $mimetype=File::MimeInfo::Magic::magic($file); + $mimetype=File::MimeInfo::Magic::magic($file); } # Fall back to using file, which has a more complete diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 0c0e27521..3879abeae 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -341,8 +341,8 @@ sub parse_diff_tree ($) { my $dt_ref = shift; # End of stream? - return if !defined @{ $dt_ref } || - !defined @{ $dt_ref }[0] || !length @{ $dt_ref }[0]; + return if ! @{ $dt_ref } || + !defined $dt_ref->[0] || !length $dt_ref->[0]; my %ci; # Header line. diff --git a/IkiWiki/Plugin/highlight.pm b/IkiWiki/Plugin/highlight.pm index 4e86207f1..fbe7ddff4 100644 --- a/IkiWiki/Plugin/highlight.pm +++ b/IkiWiki/Plugin/highlight.pm @@ -89,7 +89,7 @@ sub checkconfig () { id => $file, call => sub { my %params=@_; - highlight($langfile, $params{content}); + highlight($langfile, $file, $params{content}); }, longname => sprintf(gettext("Source code: %s"), $file), @opts, @@ -106,7 +106,7 @@ sub htmlizeformat { return; } - return Encode::decode_utf8(highlight($langfile, shift)); + return Encode::decode_utf8(highlight($langfile, $format, shift)); } my %ext2lang; @@ -172,6 +172,7 @@ sub ext2langfile ($) { # Interface to the highlight C library. sub highlight ($$) { my $langfile=shift; + my $extorfile=shift; my $input=shift; eval q{use highlight}; @@ -200,7 +201,7 @@ sub highlight ($$) { $gen=$highlighters{$langfile}; } - return $gen->generateString($input); + return "
".$gen->generateString($input)."
"; } 1 diff --git a/IkiWiki/Plugin/htmlscrubber.pm b/IkiWiki/Plugin/htmlscrubber.pm index a58a27d52..36c012c73 100644 --- a/IkiWiki/Plugin/htmlscrubber.pm +++ b/IkiWiki/Plugin/htmlscrubber.pm @@ -29,6 +29,7 @@ sub import { "irc", "ircs", "lastfm", "ldaps", "magnet", "mms", "msnim", "notes", "rsync", "secondlife", "skype", "ssh", "sftp", "smb", "sms", "snews", "webcal", "ymsgr", + "bitcoin", "git", "svn", "bzr", "darcs", "hg" ); # data is a special case. Allow a few data:image/ types, # but disallow data:text/javascript and everything else. diff --git a/IkiWiki/Plugin/map.pm b/IkiWiki/Plugin/map.pm index 38f090ff7..4a9bf58db 100644 --- a/IkiWiki/Plugin/map.pm +++ b/IkiWiki/Plugin/map.pm @@ -72,6 +72,9 @@ sub preprocess (@) { $common_prefix=IkiWiki::dirname($common_prefix); } + # Set this to 1 or more spaces to pretty-print maps for debugging + my $spaces = ""; + # Create the map. my $parent=""; my $indent=0; @@ -94,33 +97,37 @@ sub preprocess (@) { if defined $common_prefix && length $common_prefix; my $depth = ($item =~ tr/\//\//) + 1; my $baseitem=IkiWiki::dirname($item); - my $parentbase=IkiWiki::dirname($parent); - while (length $parentbase && length $baseitem && $baseitem !~ /^\Q$parentbase\E(\/|$)/) { - $parentbase=IkiWiki::dirname($parentbase); + while (length $parent && length $baseitem && $baseitem !~ /^\Q$parent\E(\/|$)/) { + $parent=IkiWiki::dirname($parent); last if length $addparent && $baseitem =~ /^\Q$addparent\E(\/|$)/; $addparent=""; - $indent--; - $map .= "\n"; - if ($indent > 0) { - $map .= "\n"; + $map .= ($spaces x $indent) . "\n"; + if ($indent > 1) { + $map .= ($spaces x $indent) . "\n"; } + $indent--; } while ($depth < $indent) { - $indent--; - $map .= "\n"; - if ($indent > 0) { - $map .= "\n"; + $map .= ($spaces x $indent) . "\n"; + if ($indent > 1) { + $map .= ($spaces x $indent) . "\n"; } + $indent--; } my @bits=split("/", $item); my $p=""; - $indent++ unless length $parent; $p.="/".shift(@bits) for 1..$indent; while ($depth > $indent) { - if (@bits && !(length $parent && "/$parent" eq $p)) { + $indent++; + if ($indent > 1) { + $map .= ($spaces x $indent) . "
    \n"; + } + if ($depth > $indent) { + $p.="/".shift(@bits); $addparent=$p; $addparent=~s/^\///; - $map .= "
  • " + $map .= ($spaces x $indent) . "
  • \n"; + $map .= ($spaces x $indent) .htmllink($params{page}, $params{destpage}, "/".$common_prefix.$p, class => "mapparent", noimageinline => 1) @@ -130,14 +137,10 @@ sub preprocess (@) { else { $openli=0; } - $indent++; - $p.="/".shift(@bits) if @bits; - if ($indent > 1) { - $map .= "
      \n"; - } } - $map .= "\n" if $openli; - $map .= "
    • " + $map .= ($spaces x $indent) . "
    • \n" if $openli; + $map .= ($spaces x $indent) . "
    • \n"; + $map .= ($spaces x $indent) .htmllink($params{page}, $params{destpage}, "/".$common_prefix."/".$item, @linktext, @@ -147,9 +150,12 @@ sub preprocess (@) { $parent=$item; } while ($indent > 0) { + $map .= ($spaces x $indent) . "
    • \n"; $indent--; - $map .= "\n
    \n"; + $map .= ($spaces x $indent) . "
\n"; } + $map =~ s{\n *\n *
    \n}{\n}gs; + $map =~ s{}{}g; $map .= "\n"; return $map; } diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 421f1dc86..7ea70b5d1 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -107,12 +107,12 @@ sub preprocess (@) { # fallthrough } elsif ($key eq 'license') { - push @{$metaheaders{$page}}, ''; + push @{$metaheaders{$page}}, ''; $pagestate{$page}{meta}{license}=$value; return ""; } elsif ($key eq 'copyright') { - push @{$metaheaders{$page}}, ''; + push @{$metaheaders{$page}}, ''; $pagestate{$page}{meta}{copyright}=$value; return ""; } diff --git a/IkiWiki/Plugin/notifyemail.pm b/IkiWiki/Plugin/notifyemail.pm index 2c1775f2e..b50a22a00 100644 --- a/IkiWiki/Plugin/notifyemail.pm +++ b/IkiWiki/Plugin/notifyemail.pm @@ -78,6 +78,7 @@ sub anonsubscribe ($$) { sub notify (@) { my @files=@_; return unless @files; + return if $config{rebuild}; eval q{use Mail::Sendmail}; error $@ if $@; diff --git a/IkiWiki/Plugin/opendiscussion.pm b/IkiWiki/Plugin/opendiscussion.pm index 2805f60ef..808d3cd2b 100644 --- a/IkiWiki/Plugin/opendiscussion.pm +++ b/IkiWiki/Plugin/opendiscussion.pm @@ -25,7 +25,7 @@ sub canedit ($$) { my $cgi=shift; my $session=shift; - return "" if $page=~/(\/|^)\Q$config{discussionpage}\E$/i; + return "" if $config{discussion} && $page=~/(\/|^)\Q$config{discussionpage}\E$/i; return "" if pagespec_match($page, "postcomment(*)"); return undef; } diff --git a/IkiWiki/Plugin/openid.pm b/IkiWiki/Plugin/openid.pm index b6642619a..40a956849 100644 --- a/IkiWiki/Plugin/openid.pm +++ b/IkiWiki/Plugin/openid.pm @@ -100,9 +100,10 @@ sub formbuilder_setup (@) { IkiWiki::openiduser($session->param("name"))) { $form->field(name => "openid_identifier", disabled => 1, label => htmllink("", "", "ikiwiki/OpenID", noimageinline => 1), - value => $session->param("name"), - size => length($session->param("name")), force => 1, - fieldset => "login"); + value => "", + size => 1, force => 1, + fieldset => "login", + comment => $session->param("name")); $form->field(name => "email", type => "hidden"); } } diff --git a/IkiWiki/Plugin/osm.pm b/IkiWiki/Plugin/osm.pm index c9c5646c4..a7baa5f2b 100644 --- a/IkiWiki/Plugin/osm.pm +++ b/IkiWiki/Plugin/osm.pm @@ -60,6 +60,46 @@ sub getsetup () { safe => 0, rebuild => 1, }, + osm_openlayers_url => { + type => "string", + example => "http://www.openlayers.org/api/OpenLayers.js", + description => "Url for the OpenLayers.js file", + safe => 0, + rebuild => 1, + }, + osm_layers => { + type => "string", + example => { 'OSM', 'GoogleSatellite' }, + description => "Layers to use in the map. Can be either the 'OSM' string or a type option for Google maps (GoogleNormal, GoogleSatellite, GoogleHybrid or GooglePhysical). It can also be an arbitrary URL in a syntax acceptable for OpenLayers.Layer.OSM.url parameter.", + safe => 0, + rebuild => 1, + }, + osm_google_apikey => { + type => "string", + example => "", + description => "Google maps API key, Google layer not used if missing, see https://code.google.com/apis/console/ to get an API key", + safe => 1, + rebuild => 1, + }, +} + +sub register_rendered_files { + my $map = shift; + my $page = shift; + my $dest = shift; + + if ($page eq $dest) { + my %formats = get_formats(); + if ($formats{'GeoJSON'}) { + will_render($page, "$map/pois.json"); + } + if ($formats{'CSV'}) { + will_render($page, "$map/pois.txt"); + } + if ($formats{'KML'}) { + will_render($page, "$map/pois.kml"); + } + } } sub preprocess { @@ -98,6 +138,8 @@ sub preprocess { ); } + register_rendered_files($map, $page, $dest); + $pagestate{$page}{'osm'}{$map}{'displays'}{$name} = { height => $height, width => $width, @@ -108,6 +150,7 @@ sub preprocess { lat => $lat, lon => $lon, href => $href, + google_apikey => $config{'osm_google_apikey'}, }; return "
    "; } @@ -150,18 +193,7 @@ sub process_waypoint { } $icon = urlto($icon, $dest, 1); $tag = '' unless $tag; - if ($page eq $dest) { - my %formats = get_formats(); - if ($formats{'GeoJSON'}) { - will_render($page, "$map/pois.json"); - } - if ($formats{'CSV'}) { - will_render($page, "$map/pois.txt"); - } - if ($formats{'KML'}) { - will_render($page, "$map/pois.kml"); - } - } + register_rendered_files($map, $page, $dest); $pagestate{$page}{'osm'}{$map}{'waypoints'}{$name} = { page => $page, desc => $desc, @@ -327,22 +359,29 @@ sub writekml($;$) { foreach my $map (keys %waypoints) { my $output; my $writer = XML::Writer->new( OUTPUT => \$output, - DATA_MODE => 1, ENCODING => 'UTF-8'); + DATA_MODE => 1, DATA_INDENT => ' ', ENCODING => 'UTF-8'); $writer->xmlDecl(); $writer->startTag("kml", "xmlns" => "http://www.opengis.net/kml/2.2"); + $writer->startTag("Document"); # first pass: get the icons + my %tags_map = (); # keep track of tags seen foreach my $name (keys %{$waypoints{$map}}) { my %options = %{$waypoints{$map}{$name}}; - $writer->startTag("Style", id => $options{tag}); - $writer->startTag("IconStyle"); - $writer->startTag("Icon"); - $writer->startTag("href"); - $writer->characters($options{icon}); - $writer->endTag(); - $writer->endTag(); - $writer->endTag(); - $writer->endTag(); + if (!$tags_map{$options{tag}}) { + debug("found new style " . $options{tag}); + $tags_map{$options{tag}} = (); + $writer->startTag("Style", id => $options{tag}); + $writer->startTag("IconStyle"); + $writer->startTag("Icon"); + $writer->startTag("href"); + $writer->characters($options{icon}); + $writer->endTag(); + $writer->endTag(); + $writer->endTag(); + $writer->endTag(); + } + $tags_map{$options{tag}}{$name} = \%options; } foreach my $name (keys %{$waypoints{$map}}) { @@ -389,6 +428,7 @@ sub writekml($;$) { $writer->endTag(); } $writer->endTag(); + $writer->endTag(); $writer->end(); writefile("pois.kml", $config{destdir} . "/$map", $output); @@ -500,6 +540,7 @@ sub cgi($) { zoom => "urlParams['zoom']", fullscreen => 1, editable => 1, + google_apikey => $config{'osm_google_apikey'}, ); print ""; print ""; @@ -509,9 +550,14 @@ sub cgi($) { sub embed_map_code(;$) { my $page=shift; - return ''. + my $olurl = $config{osm_openlayers_url} || "http://www.openlayers.org/api/OpenLayers.js"; + my $code = ''."\n". ''."\n"; + if ($config{'osm_google_apikey'}) { + $code .= ''; + } + return $code; } sub map_setup_code($;@) { @@ -519,6 +565,8 @@ sub map_setup_code($;@) { my $name=shift; my %options=@_; + my $mapurl = $config{osm_map_url}; + eval q{use JSON}; error $@ if $@; @@ -535,6 +583,11 @@ sub map_setup_code($;@) { $options{'kmlurl'} = urlto($map."/pois.kml"); } + if ($mapurl) { + $options{'mapurl'} = $mapurl; + } + $options{'layers'} = $config{osm_layers}; + return "mapsetup('mapdiv-$name', " . to_json(\%options) . ");"; } diff --git a/IkiWiki/Plugin/poll.pm b/IkiWiki/Plugin/poll.pm index 2773486a6..32756a571 100644 --- a/IkiWiki/Plugin/poll.pm +++ b/IkiWiki/Plugin/poll.pm @@ -23,11 +23,13 @@ sub getsetup () { my %pagenum; sub preprocess (@) { - my %params=(open => "yes", total => "yes", percent => "yes", @_); + my %params=(open => "yes", total => "yes", percent => "yes", + expandable => "no", @_); my $open=IkiWiki::yesno($params{open}); my $showtotal=IkiWiki::yesno($params{total}); my $showpercent=IkiWiki::yesno($params{percent}); + my $expandable=IkiWiki::yesno($params{expandable}); $pagenum{$params{page}}++; my %choices; @@ -74,6 +76,19 @@ sub preprocess (@) { $ret.="\n"; } } + + if ($expandable && $open && exists $config{cgiurl}) { + $ret.="

    \n"; + $ret.="

    \n"; + $ret.="\n"; + $ret.="\n"; + $ret.="\n"; + $ret.=gettext("Write in").": \n"; + $ret.="\n"; + $ret.="
    \n"; + $ret.="

    \n"; + } + if ($showtotal) { $ret.="".gettext("Total votes:")." $total\n"; } @@ -85,7 +100,7 @@ sub sessioncgi ($$) { my $session=shift; if (defined $cgi->param('do') && $cgi->param('do') eq "poll") { my $choice=decode_utf8($cgi->param('choice')); - if (! defined $choice) { + if (! defined $choice || not length $choice) { error("no choice specified"); } my $num=$cgi->param('num'); @@ -118,7 +133,14 @@ sub sessioncgi ($$) { my $params=shift; return "\\[[$prefix $params]]" if $escape; if (--$num == 0) { - $params=~s/(^|\s+)(\d+)\s+"?\Q$choice\E"?(\s+|$)/$1.($2+1)." \"$choice\"".$3/se; + if ($params=~s/(^|\s+)(\d+)\s+"?\Q$choice\E"?(\s+|$)/$1.($2+1)." \"$choice\"".$3/se) { + } + elsif ($params=~/expandable=(\w+)/ + & &IkiWiki::yesno($1)) { + $choice=~s/["\]\n\r]//g; + $params.=" 1 \"$choice\"" + if length $choice; + } if (defined $oldchoice) { $params=~s/(^|\s+)(\d+)\s+"?\Q$oldchoice\E"?(\s+|$)/$1.($2-1 >=0 ? $2-1 : 0)." \"$oldchoice\"".$3/se; } diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm index 8ce9474be..eec9803be 100644 --- a/IkiWiki/Plugin/recentchanges.pm +++ b/IkiWiki/Plugin/recentchanges.pm @@ -165,6 +165,7 @@ sub store ($$$) { # Limit pages to first 10, and add links to the changed pages. my $is_excess = exists $change->{pages}[10]; delete @{$change->{pages}}[10 .. @{$change->{pages}}] if $is_excess; + my $has_diffurl=0; $change->{pages} = [ map { if (length $config{cgiurl}) { @@ -180,6 +181,9 @@ sub store ($$$) { else { $_->{link} = pagetitle($_->{page}); } + if (defined $_->{diffurl} && length($_->{diffurl})) { + $has_diffurl=1; + } $_; } @{$change->{pages}} @@ -227,6 +231,8 @@ sub store ($$$) { wikiname => $config{wikiname}, ); + $template->param(has_diffurl => 1) if $has_diffurl; + $template->param(permalink => urlto($config{recentchangespage})."#change-".titlepage($change->{rev})) if exists $config{url}; diff --git a/IkiWiki/Plugin/recentchangesdiff.pm b/IkiWiki/Plugin/recentchangesdiff.pm index 418822793..eb358be67 100644 --- a/IkiWiki/Plugin/recentchangesdiff.pm +++ b/IkiWiki/Plugin/recentchangesdiff.pm @@ -9,10 +9,12 @@ use HTML::Entities; my $maxlines=200; sub import { + add_underlay("javascript"); hook(type => "getsetup", id => "recentchangesdiff", call => \&getsetup); hook(type => "pagetemplate", id => "recentchangesdiff", call => \&pagetemplate); + hook(type => "format", id => "recentchangesdiff.pm", call => \&format); } sub getsetup () { @@ -55,4 +57,24 @@ sub pagetemplate (@) { } } +sub format (@) { + my %params=@_; + + if (! ($params{content}=~s!^(]*>)!$1.include_javascript($params{page})!em)) { + # no tag, probably in preview mode + $params{content}=include_javascript(undef).$params{content}; + } + return $params{content}; +} + +# taken verbatim from toggle.pm +sub include_javascript ($) { + my $from=shift; + + return ''."\n". + ''; +} + 1 diff --git a/IkiWiki/Plugin/theme.pm b/IkiWiki/Plugin/theme.pm index ee94547e9..9b84ea7f0 100644 --- a/IkiWiki/Plugin/theme.pm +++ b/IkiWiki/Plugin/theme.pm @@ -9,6 +9,7 @@ sub import { hook(type => "getsetup", id => "theme", call => \&getsetup); hook(type => "checkconfig", id => "theme", call => \&checkconfig); hook(type => "needsbuild", id => "theme", call => \&needsbuild); + hook(type => "pagetemplate", id => "theme", call => \&pagetemplate); } sub getsetup () { @@ -63,4 +64,12 @@ sub needsbuild ($) { return $needsbuild; } +sub pagetemplate (@) { + my %params=@_; + my $template=$params{template}; + if (exists $config{theme} && length $config{theme}) { + $template->param("theme_$config{theme}" => 1); + } +} + 1 diff --git a/IkiWiki/Plugin/trail.pm b/IkiWiki/Plugin/trail.pm index 7d2338f9b..d5fb2b5d6 100644 --- a/IkiWiki/Plugin/trail.pm +++ b/IkiWiki/Plugin/trail.pm @@ -62,12 +62,20 @@ sub getsetup () { }, } +# Cache of pages' old titles, so we can tell whether they changed +my %old_trail_titles; + sub needsbuild (@) { my $needsbuild=shift; + foreach my $page (keys %pagestate) { if (exists $pagestate{$page}{trail}) { if (exists $pagesources{$page} && grep { $_ eq $pagesources{$page} } @$needsbuild) { + # Remember its title, so we can know whether + # it changed. + $old_trail_titles{$page} = title_of($page); + # Remove state, it will be re-added # if the preprocessor directive is still # there during the rebuild. {item} is the @@ -78,6 +86,7 @@ sub needsbuild (@) { } } } + return $needsbuild; } @@ -230,6 +239,12 @@ sub trails_differ { if (! exists $new->{$trail}) { return 1; } + + if (exists $old_trail_titles{$trail} && + title_of($trail) ne $old_trail_titles{$trail}) { + return 1; + } + my ($old_p, $old_n) = @{$old->{$trail}}; my ($new_p, $new_n) = @{$new->{$trail}}; $old_p = "" unless defined $old_p; @@ -239,9 +254,20 @@ sub trails_differ { if ($old_p ne $new_p) { return 1; } + + if (exists $old_trail_titles{$old_p} && + title_of($old_p) ne $old_trail_titles{$old_p}) { + return 1; + } + if ($old_n ne $new_n) { return 1; } + + if (exists $old_trail_titles{$old_n} && + title_of($old_n) ne $old_trail_titles{$old_n}) { + return 1; + } } foreach my $trail (keys %$new) { @@ -318,8 +344,6 @@ sub prerender { $prev = $members->[$i - 1] if $i > 0; my $next = $members->[$i + 1]; - add_depends($member, $trail); - $member_to_trails{$member}{$trail} = [$prev, $next]; } @@ -359,6 +383,12 @@ sub prerender { sub build_affected { my %affected; + # In principle we might not have done this yet, although in practice + # at least the trail itself has probably changed, and its template + # almost certainly contains TRAILS or TRAILLOOP, triggering our + # prerender as a side-effect. + prerender(); + foreach my $member (keys %rebuild_trail_members) { $affected{$member} = sprintf(gettext("building %s, its previous or next page has changed"), $member); } @@ -381,6 +411,8 @@ sub pagetemplate (@) { my $page = $params{page}; my $template = $params{template}; + return unless length $page; + if ($template->query(name => 'trails') && ! $recursive) { prerender(); @@ -406,13 +438,11 @@ sub pagetemplate (@) { my ($prevurl, $nexturl, $prevtitle, $nexttitle); if (defined $prev) { - add_depends($params{destpage}, $prev); $prevurl = urlto($prev, $page); $prevtitle = title_of($prev); } if (defined $next) { - add_depends($params{destpage}, $next); $nexturl = urlto($next, $page); $nexttitle = title_of($next); } diff --git a/IkiWiki/Plugin/underlay.pm b/IkiWiki/Plugin/underlay.pm index 3ea19c635..2967761c8 100644 --- a/IkiWiki/Plugin/underlay.pm +++ b/IkiWiki/Plugin/underlay.pm @@ -18,6 +18,7 @@ sub getsetup () { plugin => { safe => 0, rebuild => undef, + section => "special-purpose", }, add_underlays => { type => "string", diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm index 48f3d4634..453d19670 100644 --- a/IkiWiki/Setup.pm +++ b/IkiWiki/Setup.pm @@ -172,6 +172,11 @@ sub getsetup () { my @s=eval { $IkiWiki::hooks{getsetup}{$plugin}{call}->() }; next unless @s; + if (scalar(@s) % 2 != 0) { + print STDERR "warning: plugin $plugin has a broken getsetup; ignoring\n"; + next; + } + # set default section value (note use of shared # hashref between array and hash) my %s=@s; @@ -223,6 +228,10 @@ sub commented_dump ($$) { my $setup=$pair->[1]; my %s=@{$setup}; my $section=$s{plugin}->{section}; + if (! defined $section) { + print STDERR "warning: missing section in $plugin\n"; + $section="other"; + } push @{$section_plugins{$section}}, $plugin; if (@{$section_plugins{$section}} == 1) { push @ret, "", $indent.("#" x 70), "$indent# $section plugins", diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm index c39aa2ef7..84b4b5a2f 100644 --- a/IkiWiki/Wrapper.pm +++ b/IkiWiki/Wrapper.pm @@ -28,10 +28,11 @@ sub gen_wrappers () { %config=(%origconfig); } +our $program_to_wrap = $0; sub gen_wrapper () { $config{srcdir}=File::Spec->rel2abs($config{srcdir}); $config{destdir}=File::Spec->rel2abs($config{destdir}); - my $this=File::Spec->rel2abs($0); + my $this=File::Spec->rel2abs($program_to_wrap); if (! -x $this) { error(sprintf(gettext("%s doesn't seem to be executable"), $this)); } @@ -93,12 +94,53 @@ EOF # memory, a pile up of processes could cause thrashing # otherwise. The fd of the lock is stored in # IKIWIKI_CGILOCK_FD so unlockwiki can close it. - $pre_exec=<<"EOF"; + # + # A lot of cgi wrapper processes can potentially build + # up and clog an otherwise unloaded web server. To + # partially avoid this, when a GET comes in and the lock + # is already held, rather than blocking a html page is + # constructed that retries. This is enabled by setting + # cgi_overload_delay. + if (defined $config{cgi_overload_delay} && + $config{cgi_overload_delay} =~/^[0-9]+/) { + my $i=int($config{cgi_overload_delay}); + $pre_exec.="#define CGI_OVERLOAD_DELAY $i\n" + if $i > 0; + my $msg=gettext("Please wait"); + $msg=~s/"/\\"/g; + $pre_exec.='#define CGI_PLEASE_WAIT_TITLE "'.$msg."\"\n"; + if (defined $config{cgi_overload_message} && length $config{cgi_overload_message}) { + $msg=$config{cgi_overload_message}; + $msg=~s/"/\\"/g; + } + $pre_exec.='#define CGI_PLEASE_WAIT_BODY "'.$msg."\"\n"; + } + $pre_exec.=<<"EOF"; lockfd=open("$config{wikistatedir}/cgilock", O_CREAT | O_RDWR, 0666); - if (lockfd != -1 && lockf(lockfd, F_LOCK, 0) == 0) { - char *fd_s=malloc(8); - sprintf(fd_s, "%i", lockfd); - setenv("IKIWIKI_CGILOCK_FD", fd_s, 1); + if (lockfd != -1) { +#ifdef CGI_OVERLOAD_DELAY + char *request_method = getenv("REQUEST_METHOD"); + if (request_method && strcmp(request_method, "GET") == 0) { + if (lockf(lockfd, F_TLOCK, 0) == 0) { + set_cgilock_fd(lockfd); + } + else { + printf("Content-Type: text/html\\nRefresh: %i; URL=%s\\n\\n%s

    %s

    ", + CGI_OVERLOAD_DELAY, + getenv("REQUEST_URI"), + CGI_PLEASE_WAIT_TITLE, + CGI_PLEASE_WAIT_BODY); + exit(0); + } + } + else if (lockf(lockfd, F_LOCK, 0) == 0) { + set_cgilock_fd(lockfd); + } +#else + if (lockf(lockfd, F_LOCK, 0) == 0) { + set_cgilock_fd(lockfd); + } +#endif } EOF } @@ -140,6 +182,12 @@ void addenv(char *var, char *val) { newenviron[i++]=s; } +set_cgilock_fd (int lockfd) { + char *fd_s=malloc(8); + sprintf(fd_s, "%i", lockfd); + setenv("IKIWIKI_CGILOCK_FD", fd_s, 1); +} + int main (int argc, char **argv) { int lockfd=-1; char *s; @@ -214,7 +262,7 @@ $set_background_command EOF my @cc=exists $ENV{CC} ? possibly_foolish_untaint($ENV{CC}) : 'cc'; - push @cc, possibly_foolish_untaint($ENV{CFLAGS}) if exists $ENV{CFLAGS}; + push @cc, split(' ', possibly_foolish_untaint($ENV{CFLAGS})) if exists $ENV{CFLAGS}; if (system(@cc, "$wrapper.c", "-o", "$wrapper.new") != 0) { #translators: The parameter is a C filename. error(sprintf(gettext("failed to compile %s"), "$wrapper.c")); diff --git a/Makefile.PL b/Makefile.PL index ef29a950c..f1df8bcd3 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -96,7 +96,7 @@ underlay_install: install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/$$theme; \ for file in $$theme/*; do \ if echo "$$file" | grep -q style.css; then \ - (cat doc/style.css; cat $$theme/base.css 2>/dev/null; cat $$file) >> $(DESTDIR)$(PREFIX)/share/ikiwiki/$$theme/style.css; \ + (cat doc/style.css; cat $$theme/base.css 2>/dev/null; cat $$file) > $(DESTDIR)$(PREFIX)/share/ikiwiki/$$theme/style.css; \ elif echo "$$file" | grep -q base.css; then \ :; \ elif [ -f "$$file" ]; then \ diff --git a/debian/changelog b/debian/changelog index ce2ec060a..375a9d0a9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,108 @@ +ikiwiki (3.20130519) UNRELEASED; urgency=low + + * blogspam: Fix encoding issue in RPC::XML call. + Thanks, Changaco + + -- Joey Hess Sun, 23 Jun 2013 14:02:01 -0400 + +ikiwiki (3.20130518) unstable; urgency=low + + * Fix test suite to not fail when XML::Twig is not installed. + Closes: #707436 + * theme: Now can be used in all templates when + a theme is enabled. + * notifyemail: Fix bug that caused duplicate emails to be sent when + site was rebuilt. + * bzr: bzr rm no longer has a --force option, remove + + -- Joey Hess Sat, 18 May 2013 16:28:21 -0400 + +ikiwiki (3.20130504) unstable; urgency=low + + * Allow dots in directive parameter names. (tango) + * Add missing plugin section, and deal with missing sections with a warning. + * Detect plugins with a broken getsetup and warn. + * map: Correct reversion introduced in version 3.20110225 that could + generate invalid html. (smcv) + * Makefile.PL: overwrite theme style.css instead of appending + (Thanks, Mikko Rapeli) + * meta: Fix anchors used to link to the page's license and copyright. + Closes: #706437 + + -- Joey Hess Sat, 04 May 2013 23:47:21 -0400 + +ikiwiki (3.20130212) unstable; urgency=low + + * htmlscrubber: Allow the bitcoin URI scheme. + * htmlscrubber: Allow the URI schemes of major VCS's. + * aggregate: When run with --aggregate, if an aggregation is already + running, don't go on and --refresh. + * trail: Avoid excess dependencies between pages in the trail + and the page defining the trail. Thanks, smcv. + * opendiscussion: Don't allow editing discussion pages if discussion pages + are disabled. (smcv) + * poll: Add expandable option to allow users to easily add new choices to + a poll. + * trail: Avoid massive slowdown caused by pagetemplate hook when displaying + dynamic cgi pages, which cannot use trail anyway. + * Deal with empty diffurl in configuration. + * cvs: Various fixes. (schmonz) + * highlight: Now adds a span with class highlight- around + highlighted content, allowing for language-specific css styling. + + -- Joey Hess Tue, 12 Feb 2013 21:48:02 -0400 + +ikiwiki (3.20121212) unstable; urgency=low + + * filecheck: Fix bug that prevented File::MimeInfo::Magic from ever + being used. + * openid: Display openid in Preferences page as a comment, so it can be + selected in all browsers. + + -- Joey Hess Tue, 11 Dec 2012 12:12:12 -0400 + +ikiwiki (3.20121017) unstable; urgency=low + + * recentchangesdiff: fix further breakage to the template from 3.20120725 + + -- Joey Hess Tue, 16 Oct 2012 20:49:27 -0400 + +ikiwiki (3.20121016) unstable; urgency=low + + * monochrome: New theme, contributed by Jon Dowland. + * rst: Ported to python 3, while still also being valid python 2. + Thanks, W. Trevor King + * Try to avoid a situation in which so many ikiwiki cgi wrapper programs + are running, all waiting on some long-running thing like a site rebuild, + that it prevents the web server from doing anything else. The current + approach only avoids this problem for GET requests; if multiple cgi's + run GETs on a site at the same time, one will display a "please wait" + page for a configurable number of seconds, which then redirects to retry. + To enable this protection, set cgi_overload_delay to the number of + seconds to wait. This is not enabled by default. + * Add back a 1em margin between archivepage divs. + * recentchangesdiff: Correct broken template that resulted in duplicate + diff icons being displayed, and bloated the recentchanges page with + inline diffs when the configuration should have not allowed them. + + -- Joey Hess Tue, 16 Oct 2012 15:14:19 -0400 + +ikiwiki (3.20120725) unstable; urgency=low + + * recentchangesdiff: When diffurl is not set, provide inline diffs + in the recentchanges page, with visibility toggleable via javascript. + Thanks, Antoine Beaupré + * Split CFLAGS into words when building wrapper. Closes: #682237 + * osm: Avoid calling urlto before generated files are registered. + Thanks, Philippe Gauthier and Antoine Beaupré + * osm: Add osm_openlayers_url configuration setting. + Thanks, Genevieve + * osm: osm_layers can be used to configured the layers displayed on the map. + Thanks, Antoine Beaupré + * comments: Remove ipv6 address specific code. + + -- Joey Hess Sat, 25 Aug 2012 10:58:42 -0400 + ikiwiki (3.20120629) unstable; urgency=low * mirrorlist: Add mirrorlist_use_cgi setting that avoids usedirs or diff --git a/debian/copyright b/debian/copyright index ee52c0eda..e1a81932b 100644 --- a/debian/copyright +++ b/debian/copyright @@ -248,6 +248,10 @@ Files: underlays/themes/goldtype/* Copyright: © Lars Wirzenius License: GPL-2+ +Files: underlays/themes/monochrome/* +Copyright: © 2012 Jon Dowland +License: GPL-2+ + License: BSD-2-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions diff --git a/doc/branches.mdwn b/doc/branches.mdwn index b7b9164ac..232f2ce6a 100644 --- a/doc/branches.mdwn +++ b/doc/branches.mdwn @@ -20,6 +20,6 @@ Long-lived branches in the main git repository: * `ignore` gets various branches merged to it that [[Joey]] wishes to ignore when looking at everyone's unmerged changes. * `pristine-tar` contains deltas that - [pristine-tar](http://kitenet.net/~joey/code/pristine-tar) + [pristine-tar](http://joeyh.name/code/pristine-tar) can use to recreate released tarballs of ikiwiki * `setup` contains the ikiwiki.setup file for this site diff --git a/doc/bugs/CGI_wrapper_doesn__39__t_store_PERL5LIB_environment_variable.mdwn b/doc/bugs/CGI_wrapper_doesn__39__t_store_PERL5LIB_environment_variable.mdwn index 0da368644..81a5abf28 100644 --- a/doc/bugs/CGI_wrapper_doesn__39__t_store_PERL5LIB_environment_variable.mdwn +++ b/doc/bugs/CGI_wrapper_doesn__39__t_store_PERL5LIB_environment_variable.mdwn @@ -6,3 +6,23 @@ I think the CGI wrapper should remember PERL5LIB too. -- Martin +Thank's a lot for pointing me to this location in the code. I was looking it for some time. + +This brutal patch implement your solution as a temporary fix. + + *** Wrapper.pm.old 2012-08-25 16:41:41.000000000 +0200 + --- Wrapper.pm 2012-10-01 17:33:17.582956524 +0200 + *************** + *** 149,154 **** + --- 149,155 ---- + $envsave + newenviron[i++]="HOME=$ENV{HOME}"; + newenviron[i++]="PATH=$ENV{PATH}"; + + newenviron[i++]="PERL5LIB=$ENV{PERL5LIB}"; + newenviron[i++]="WRAPPED_OPTIONS=$configstring"; + + #ifdef __TINYC__ + +As I am not sure that remembering `PERL5LIB` is a good idea, I think that a prettier solution will be to add a config variable (let's say `cgi_wrapper_perllib`) which, if fixed, contains the `PERL5LIB` value to include in the wrapper, or another (let's say `cgi_wrapper_remember_libdir`), which, if fixed, remember the current `PERL5LIB`. + +-- Bruno diff --git a/doc/bugs/CamelCase_and_Recent_Changes_create_spurious_Links.mdwn b/doc/bugs/CamelCase_and_Recent_Changes_create_spurious_Links.mdwn new file mode 100644 index 000000000..de95fb7d3 --- /dev/null +++ b/doc/bugs/CamelCase_and_Recent_Changes_create_spurious_Links.mdwn @@ -0,0 +1,11 @@ +Hi folks, + +This is a fairly fresh wiki. I recently noticed the Links: section the the bottom looked like this: + +Links: index recentchanges/change 0b2f03d3d21a3bb21f6de75d8711c73df227e17c recentchanges/change 1c5b830b15c4f2f0cc97ecc0adfd60a1f1578918 recentchanges/change 20b20b91b90b28cdf2563eb959a733c6dfebea7a recentchanges/change 3377cedd66380ed416f59076d69f546bf12ae1e4 recentchanges/change 4c53d778870ea368931e7df2a40ea67d00130202 recentchanges/change 7a9f3c441a9ec7e189c9df322851afa21fd8b00c recentchanges/change 7dcaea1be47308ee27a18f893ff232a8370e348a recentchanges/change 963245d4e127159e12da436dea30941ec371c6be recentchanges/change cd489ff4abde8dd611f7e42596b93953b38b9e1c ... + +All of those "recentchanges/ change xxxxxxx" links are clickable, but all yield 404 when clicked. + +When I disable the CamelCase plugin and rebuild the wiki, all the Links other than index disappear, as they should. Re-enable CamelCase, and they're back. + +This is a very simple wiki. Just fresh, only one page other than index (this one), and nothing at all fancy/weird about it. diff --git a/doc/bugs/Existing_Discussion_pages_appear_as_non-existing.mdwn b/doc/bugs/Existing_Discussion_pages_appear_as_non-existing.mdwn index 093eb77aa..9ba4ede6e 100644 --- a/doc/bugs/Existing_Discussion_pages_appear_as_non-existing.mdwn +++ b/doc/bugs/Existing_Discussion_pages_appear_as_non-existing.mdwn @@ -1,3 +1,5 @@ If you look at [[todo/org mode]], the link to the Discussion page is not there (has a question mark), as if it didn't exist. But--through the search--I discovered that the Discussion page does exist actually: [[todo/org mode/Discussion]]. So, there is a bug that prevents a link to the existing Discussion page from appearing in the correct way on the corresponding main page. --Ivan Z. + +Perhaps, this has something to do with the same piece of code/logic (concerning case-sensitivity) as the fixed [[bugs/unwanted discussion links on discussion pages]]? --Ivan Z. diff --git a/doc/bugs/Linkmap_doesn__39__t_support_multiple_linkmaps_on_a_single_page.mdwn b/doc/bugs/Linkmap_doesn__39__t_support_multiple_linkmaps_on_a_single_page.mdwn new file mode 100644 index 000000000..a0645477e --- /dev/null +++ b/doc/bugs/Linkmap_doesn__39__t_support_multiple_linkmaps_on_a_single_page.mdwn @@ -0,0 +1,3 @@ +If I use the linkmap directive twice on a single page, I get the same image appearing in both locations, even though the parameters for the two directives may have been different. + +-- Martin diff --git a/doc/bugs/Navbar_does_not_link_to_page_being_commented_on_while_commenting.mdwn b/doc/bugs/Navbar_does_not_link_to_page_being_commented_on_while_commenting.mdwn new file mode 100644 index 000000000..4c7b12e8c --- /dev/null +++ b/doc/bugs/Navbar_does_not_link_to_page_being_commented_on_while_commenting.mdwn @@ -0,0 +1,11 @@ +Say you are commenting on this report. The Navbar on top will look like + +[ikiwiki](http://ikiwiki.info/)/ [bugs](http://ikiwiki.info/bugs/)/ commenting on Navbar does not link to page being commented on while commenting + +while either of those two options would be better: + +[ikiwiki](http://ikiwiki.info/)/ [bugs](http://ikiwiki.info/bugs/)/ commenting on [Navbar does not link to page being commented on while commenting](http://ikiwiki.info/bugs/Navbar_does_not_link_to_page_being_commented_on_while_commenting/) + +[ikiwiki](http://ikiwiki.info/)/ [bugs](http://ikiwiki.info/bugs/)/ [Navbar does not link to page being commented on while commenting](http://ikiwiki.info/bugs/Navbar_does_not_link_to_page_being_commented_on_while_commenting/) / New comment + +-- RichiH diff --git a/doc/bugs/Remove_redirect_pages_from_inline_pages.mdwn b/doc/bugs/Remove_redirect_pages_from_inline_pages.mdwn new file mode 100644 index 000000000..a43bd408f --- /dev/null +++ b/doc/bugs/Remove_redirect_pages_from_inline_pages.mdwn @@ -0,0 +1,15 @@ +[[!tag bugs wishlist]] + + +I accidentally made a typo spelling "surprises" and changed my URL from + + +to + + +Using the meta redir. However the meta redir now appears in the index of + +Any ideas how to handle this situation? + +> Well, you can adjust the inline's pagespec to exclude it, or even tag it +> with a tag that the pagespec is adjusted to exclude. --[[Joey]] diff --git a/doc/bugs/Slow_Filecheck_attachments___34__snails_it_all__34__.mdwn b/doc/bugs/Slow_Filecheck_attachments___34__snails_it_all__34__.mdwn new file mode 100644 index 000000000..e93f4e546 --- /dev/null +++ b/doc/bugs/Slow_Filecheck_attachments___34__snails_it_all__34__.mdwn @@ -0,0 +1,47 @@ +Saving a wiki page in ikwiki or +ikiwiki --setup wiki.setup --rebuild takes a **dozen minutes** on a tiny tiny wiki (10 user-added pages)! + +I profiled ikiwiki with [[!cpan Devel::SmallProf]] : see [[users/mathdesc]] for details. + +And I came to the conclusion that [[plugins/filecheck]] on attachment was the only cause. +It always go the fallback code using time-consuming file even there it's look like it's +not successful. + +
    + # Get the mime type.
    +        #
    +        # First, try File::Mimeinfo. This is fast, but doesn't recognise
    +        # all files.
    +        eval q{use File::MimeInfo::Magic};                    
    +        my $mimeinfo_ok=! $@;                                     
    +        my $mimetype;
    +        if ($mimeinfo_ok) {
    +                my $mimetype=File::MimeInfo::Magic::magic($file);
    +        }                                                         
    +        
    +        # Fall back to using file, which has a more complete
    +        # magic database.
    +        if (! defined $mimetype) {
    +                open(my $file_h, "-|", "file", "-bi", $file); 
    +                $mimetype=<$file_h>;                                 
    +                chomp $mimetype;                            
    +                close $file_h;                   
    +        }
    +        if (! defined $mimetype || $mimetype !~s /;.*//) {
    +                # Fall back to default value.
    +                $mimetype=File::MimeInfo::Magic::default($file)
    +                        if $mimeinfo_ok; 
    +                if (! defined $mimetype) {
    +                        $mimetype="unknown";
    +                }                                                  
    +        }        
    +
    + +I found on [[plugins/filecheck/discussion/]] what [[users/DavidBremner/]] described as : +> no way to detect text/plain using File::MimeInfo::Magic::magic() +But I can't figure out if my issue is boarder and includes this or not.. + +Any ideas , solve :) more that welcome. + +> [[done]], as isbear noted in [[discussion]], there was a bug that +> prevented File::MimeInfo::Magic from ever being used. --[[Joey]] diff --git a/doc/bugs/Slow_Filecheck_attachments___34__snails_it_all__34__/discussion.mdwn b/doc/bugs/Slow_Filecheck_attachments___34__snails_it_all__34__/discussion.mdwn new file mode 100644 index 000000000..629aba71e --- /dev/null +++ b/doc/bugs/Slow_Filecheck_attachments___34__snails_it_all__34__/discussion.mdwn @@ -0,0 +1,141 @@ +##Foreword : +Disabling of filecheck is not actually possible because btw it cause the attachment.pm to malfunction and +any of pagespec that could contain a *mimetype* condition. + +attachment.pm imports "statically" filecheck so actually disabling it should be *interdicted* . + +
    +sub import {
    +        add_underlay("attachment");
    +        add_underlay("javascript");
    +        add_underlay("jquery");
    +        hook(type => "getsetup", id => "attachment", call => \&getsetup);
    +        hook(type => "checkconfig", id => "attachment", call => \&checkconfig);
    +        hook(type => "formbuilder_setup", id => "attachment", call => \&formbuilder_setup);
    +        hook(type => "formbuilder", id => "attachment", call => \&formbuilder, last => 1);
    +        IkiWiki::loadplugin("filecheck");
    +}
    +
    + +---- + +## How bad is it ? + +So I tried on three pages to inline !mimetype(image/*) while I allowed attachment of mimetype(image/*) + +My profiling tests in the bug report shows that most of the time is spend in the "Fallback using file" block code, +I tried to comment that block and see how it'll perform. Obviously this is much much faster ... but is the mimetype +discovered using only *File::MimeInfo* ? + + +Dumping some strings before return to STDERR, rebuilding . This is just a [[!toggle id="code-test" text="dumpdebug adding"]] + +[[!toggleable id="code-test" text=""" +
    +sub match_mimetype ($$;@) {
    +        my $page=shift;
    +        my $wanted=shift;
    +
    +        my %params=@_;
    +        my $file=exists $params{file} ? $params{file} : IkiWiki::srcfile($IkiWiki::pagesources{$page});
    +        if (! defined $file) {
    +                return IkiWiki::ErrorReason->new("file does not exist");
    +        }
    +
    +        # Get the mime type.
    +        #
    +        # First, try File::Mimeinfo. This is fast, but doesn't recognise
    +        # all files.
    +        eval q{use File::MimeInfo::Magic};
    +        my $mimeinfo_ok=! $@;
    +        my $mimetype;
    +        print STDERR " --- match_mimetype (".$file.")\n";
    +        if ($mimeinfo_ok) {
    +                my $mimetype=File::MimeInfo::Magic::magic($file);
    +        }
    +
    +        # Fall back to using file, which has a more complete
    +        # magic database.
    +        #if (! defined $mimetype) {
    +        #       open(my $file_h, "-|", "file", "-bi", $file);
    +        #       $mimetype=<$file_h>;
    +        #       chomp $mimetype;
    +        #       close $file_h;
    +        #}
    +
    +        if (! defined $mimetype || $mimetype !~s /;.*//) {
    +                # Fall back to default value.
    +                $mimetype=File::MimeInfo::Magic::default($file)
    +                        if $mimeinfo_ok;
    +                if (! defined $mimetype) {
    +                        $mimetype="unknown";
    +                }
    +        }
    +
    +        my $regexp=IkiWiki::glob2re($wanted);
    +        if ($mimetype!~$regexp) {
    +                 print STDERR " xxx MIME unknown ($mimetype - $wanted - $regexp ) \n";
    +                return IkiWiki::FailReason->new("file MIME type is $mimetype, not $wanted");
    +        }
    +        else {
    +                print STDERR " vvv MIME found\n";
    +                return IkiWiki::SuccessReason->new("file MIME type is $mimetype");
    +        }
    +}
    +
    +"""]] + +The results dump to stderr (or a file called... 'say *mime*) looks like this : +
    +--- match_mimetype (/usr/share/ikiwiki/attachment/ikiwiki/jquery.fileupload-ui.js)
    + xxx MIME unknown (text/plain - image/* - (?i-xsm:^image\/.*$) )
    + --- match_mimetype (/usr/share/ikiwiki/locale/fr/directives/ikiwiki/directive/fortune.mdwn)
    + xxx MIME unknown (text/plain - image/* - (?i-xsm:^image\/.*$) )
    + --- match_mimetype (/usr/share/ikiwiki/locale/fr/basewiki/shortcuts.mdwn)
    + xxx MIME unknown (text/plain - image/* - (?i-xsm:^image\/.*$) 
    + --- match_mimetype (/usr/share/ikiwiki/smiley/smileys/alert.png)
    + xxx MIME unknown (application/octet-stream - image/* - (?i-xsm:^image\/.*$) )
    + --- match_mimetype (/usr/share/ikiwiki/attachment/ikiwiki/images/ui-bg_flat_75_ffffff_40x100.png)
    + xxx MIME unknown (application/octet-stream - image/* - (?i-xsm:^image\/.*$) 
    +
    + +--- prepend signals the file on analysis
    +xxx prepend signals a returns failure : mime is unknown, the match is a failure
    +vvv prepend signals a return success.
    + + +This is nasty-scary results ! Something missed me or this mime-filecheck is plain nuts ? + +*Question 1* : How many files have been analysed : **3055** (yet on a tiny tiny wiki) +
    grep "^ --- " mime | wc -l
    +3055
    +
    + +*Question 2* : How many time it fails : *all the time* +
    + grep "^ xxx " mime | wc -l
    +3055
    +
    + +*Question 1bis* : Doh btw , how many files have been re-analysed ? ** 2835 ** OMG !! +
    grep "^ --- " mime | sort -u | wc -l
    +220
    +
    + +## Conclusion + +- Only the system command *file -bi* works. While it is **should** be easy on the cpu , it's also hard on the I/O -> VM :( +- Something nasty with the mime implementation and/or my system configuration -> Hints ? :D +- Need to cache during the rebuild : a same page needs not being rechecked for its mime while it's locked ! + + +--mathdesc + +> > if ($mimeinfo_ok) { +> > my $mimetype=File::MimeInfo::Magic::magic($file); +> > } +> +> That seems strange to me, `my` restricts scope of $mimetype to enclosing if block, thus, assigned value will be dropped - I think, it is the problem. +> Try removing that stray `my`. +> +> --isbear diff --git a/doc/bugs/blogspam_marks_me_as_spam_on_ipv6.mdwn b/doc/bugs/blogspam_marks_me_as_spam_on_ipv6.mdwn new file mode 100644 index 000000000..9b415a84a --- /dev/null +++ b/doc/bugs/blogspam_marks_me_as_spam_on_ipv6.mdwn @@ -0,0 +1,8 @@ +I just got this message trying to post to this wiki: + + Error: Sorry, but that looks like spam to blogspam: No reverse DNS entry for 2001:1928:1:9::1 + +So yeah, it seems I have no reverse DNS for my IPv6 address, which may +be quite common for emerging IPv6 deployments... + +This may be related to [[blogspam_options whitelist vs. IPv6?]]. diff --git a/doc/bugs/capitalized_attachment_names.mdwn b/doc/bugs/capitalized_attachment_names.mdwn new file mode 100644 index 000000000..b10781bf7 --- /dev/null +++ b/doc/bugs/capitalized_attachment_names.mdwn @@ -0,0 +1,14 @@ +Given an uploaded image via: \[\[!img NAME.svg alt="image"\]\] + +Viewing the generated page shows the following error: + +"\[\[!img Error: failed to read name.svg: Exception 420: no decode delegate for this image format `/home/user/path/name.svg' @ error/svg.c/ReadSVGImage/2815\]\]" + +The caps in the image title were somehow converted to small letters and then the image is saved as a directory. Very puzzling. +I get the same error when image names are small letters. + +The error also occurs with png images. + +How do I fix this? + +Later investigation ... I got around the problem by creating the mark-up in a new directory. However, if I try to create a new directory with the same name as the directory containing the problem code, the problem re-emerges -- the old directory is apparently not overwritten. Perhaps this is an issue with the git storage. diff --git a/doc/bugs/encoding_issue_in_blogspam_plugin.mdwn b/doc/bugs/encoding_issue_in_blogspam_plugin.mdwn new file mode 100644 index 000000000..92318d165 --- /dev/null +++ b/doc/bugs/encoding_issue_in_blogspam_plugin.mdwn @@ -0,0 +1,34 @@ +[[!tag patch]] + +
    +From 5ad35b2805ca50478f07d810e57e7c9b8f4eddea Mon Sep 17 00:00:00 2001
    +From: Changaco <changaco@changaco.net>
    +Date: Tue, 4 Jun 2013 02:54:35 +0200
    +Subject: [PATCH] fix encoding issue in blogspam plugin
    +
    +RPC::XML uses ascii as default encoding, we have to tell it to use utf8.
    +
    +Without this, ikiwiki returns "failed to get response from blogspam server"
    +every time a non-ascii character is used in a content that needs checking.
    +
    +---
    + IkiWiki/Plugin/blogspam.pm | 1 +
    + 1 file changed, 1 insertion(+)
    +
    +diff --git a/IkiWiki/Plugin/blogspam.pm b/IkiWiki/Plugin/blogspam.pm
    +index d32c2f1..e48ed72 100644
    +--- a/IkiWiki/Plugin/blogspam.pm
    ++++ b/IkiWiki/Plugin/blogspam.pm
    +@@ -53,6 +53,7 @@ sub checkconfig () {
    + 	eval q{
    + 		use RPC::XML;
    + 		use RPC::XML::Client;
    ++		$RPC::XML::ENCODING = 'utf-8';
    + 	};
    + 	error $@ if $@;
    + }
    +-- 
    +1.8.3
    +
    + +[[done]] --[[Joey]] diff --git a/doc/bugs/feedpages_does_not_prevent_tags_from_being_aggregated.mdwn b/doc/bugs/feedpages_does_not_prevent_tags_from_being_aggregated.mdwn new file mode 100644 index 000000000..a004154df --- /dev/null +++ b/doc/bugs/feedpages_does_not_prevent_tags_from_being_aggregated.mdwn @@ -0,0 +1,32 @@ +I added a feedpages directive to `blog/index.mdwn` to not pick up anything tagged `tags/random/hidden` yet that still happenend. + + ~git/richardhartmann.de/blog % grep hidden index.mdwn + \[[!inline pages="./posts/*/*/* and !*/Discussion" feedpages="./posts/*/*/* and !*/Discussion and not tagged(tags/random/hidden)" show="10" actions=yes rootpage="blog"]] + ~git/richardhartmann.de/blog % grep hidden posts/2013/05/17-Debian_Release_Critical_Bug_report_for_Week_20.mdwn + \[[!tag tags/tech/floss/debian tags/tech/floss/debian/rc-stats/8.0-jessie tags/random/hidden]] + ~git/richardhartmann.de/blog % + +If you need more information, please let me know. + +Richard + +> I don't think this is a bug. You have a syntax error in your pagespec: +> "not" is not a recognised keyword in [[pagespecs|ikiwiki/pagespec]], +> so `and not tagged(...)` should be `and !tagged(...)`. Presumably inline +> falls back to `pages` when `feedpages` doesn't work. +> +> By posting the pagespec here with insufficient escaping (which I've fixed) +> you caused *this* ikiwiki instance's HTML to contain an error message +> illustrating that syntax error :-) +> +> Error: syntax error in pagespec "(./posts/*/*/* and !*/Discussion) and (./posts/*/*/* and !*/Discussion and not tagged(tags/random/hidden))" +> +> [[done]]. --[[smcv]] + +> > As per IRC: Thanks. As an aside, shouldn't this ikiwiki instance ignore directives in normal text? The problem may be non-trivial, but still... -- Richard + +>>> "Normal text" is exactly where directives go, so, not really. +>>> If you mean verbatim text (e.g. indentation in Markdown): the fact that +>>> directives still expand to HTML, which is then treated as verbatim, is an +>>> unfortunate result of how ikiwiki interacts with pages' markup languages +>>> (directives and wikilinks happen before markup is converted to HTML). --[[smcv]] diff --git a/doc/bugs/feeds_get_removed_in_strange_conditions.mdwn b/doc/bugs/feeds_get_removed_in_strange_conditions.mdwn new file mode 100644 index 000000000..deec208ba --- /dev/null +++ b/doc/bugs/feeds_get_removed_in_strange_conditions.mdwn @@ -0,0 +1,57 @@ +For some time now, in circumstances that I've had enormous troubles +trying to track, I've seen feeds getting removed by ikiwiki when +apparently unrelated pages got changed, with the message: + +> removing somepath/somepage/somefeed, no longer built by some/unrelated/page + +I've finally been able to find how and why it happens. The situation is +the following: + +* page A has an inline directive that (directly) generates a feed F +* page B inlines A, thus (indirectly) generating F again +* page B is rendered after page A + +The feed removal happens when changes are made to prevent B from +inlining A; for example, because B is a tag page and A is untagged B, or +because B includes A through a pagespec that no longer matches A. In +this case, this happens: + +* page A is built, rendering F +* page B is built, _not_ rendering F, which it used to render +* F is removed because it is not built by B anymore + +Note that although this issue is triggered (for me) from the changes I +proposed last year to allow feed generation from nested inlines +coalescing it to be page-based instead of destpage-based +(bb8f76a4a04686def8cc6f21bcca80cb2cc3b2c9 and +72c8f01b36c841b0e83a2ad7ad1365b9116075c5) there is potential for it +popping up in other cases. + +Specifically, the logic for the removal of dependent pages currently +relies on the assumption that each output has a single generator. My +changes caused this assumption to be violated, hence the error, but +other cases may pop up for other plugins in the future. + +I have a [patch] fixing this issue (for feeds specifically, i.e. only +the problem I am actually having) on top of my `mystuff` branch, but +since that also has heaps of other unrelated stuff, you may want to just +[pick it from my gitweb][gw]. + +[gw]: (http://git.oblomov.eu/ikiwiki/patch/671cb26cf50643827f258270d9ac8ad0b1388a65) + +The patch changes the `will_render()` for feeds to be based on the page +rather than on the destpage, matching the fact that for nested inlines +it's the inner page that is ultimately responsible for generating the +feed. + +I've noticed that it requires at least _two_ full rebuilds before the +index is again in a sensible state. (On the first rebuild, all feeds +from nested inlines are actually _removed_.) + +While the patch is needed because there are legitimate cases in which +nested feeds are needed (for example, I have an index page that inlines +index pages for subsection of my site, and I want _those_ feed from +being visible), there are other cases when one may want to skip feed +generation from nested inlines. + +--[[GiuseppeBilotta]] diff --git a/doc/bugs/ipv6_address_in_comments.mdwn b/doc/bugs/ipv6_address_in_comments.mdwn index 55d66e785..90391650a 100644 --- a/doc/bugs/ipv6_address_in_comments.mdwn +++ b/doc/bugs/ipv6_address_in_comments.mdwn @@ -13,3 +13,7 @@ the problem for me. Not sure if this is the best solution. --[[cstamas]] [[patch]] [[!tag ipv6]] + +> [[done]] --[[Joey]] + +> > Thank you! --[[cstamas]] diff --git a/doc/bugs/map_generates_malformed_HTML.mdwn b/doc/bugs/map_generates_malformed_HTML.mdwn new file mode 100644 index 000000000..890a6ef7f --- /dev/null +++ b/doc/bugs/map_generates_malformed_HTML.mdwn @@ -0,0 +1,36 @@ +[[!template id=gitbranch branch=smcv/ready/map author="[[Simon McVittie|smcv]]"]] +[[!tag patch]] + +`\[[!map]]` can generate bad HTML with unbalanced open/close tags +(in XML terms: "not well-formed") in certain situations. This +appears to be a regression caused by fixing +[[maps with nested directories sometimes make ugly lists]], which +suppressed some redundant `
    ` pairs, but appears not to +have the ideal logic for this, leading to malformed HTML. + +In particular, on a site with these pages: + +* alpha + * 1 + * i + * ii + * iii + * iv + * 2 + * a + * b + * 3 +* beta + +the maps "`alpha/1 or beta`", "`alpha/1/i* or alpha/2/a or beta`" and +"`alpha/1/i* or alpha/2/a`" have malformed HTML. + +My `ready/map` branch adds a regression test and makes it pass. + +The fix is not particularly elegant - it generates the previous +HTML with redundant `
    ` pairs, marks the redundant +pairs, and edits them out afterwards - but it works. If anyone can come +up with a cleaner algorithm that avoids generating the redundant tags +in the first place, that would be even better. --[[smcv]] + +> [[merged|done]] (not thrilled at this solution, but it works) --[[Joey]] diff --git a/doc/bugs/opendiscussion_should_respect_the_discussion_option.mdwn b/doc/bugs/opendiscussion_should_respect_the_discussion_option.mdwn index e4bc736e3..cacd2b73b 100644 --- a/doc/bugs/opendiscussion_should_respect_the_discussion_option.mdwn +++ b/doc/bugs/opendiscussion_should_respect_the_discussion_option.mdwn @@ -1,6 +1,11 @@ +[[!template id=gitbranch branch=smcv/ready/less-open author="[[smcv]]"]] +[[!tag patch]] + The [[plugins/opendiscussion]] plugin allows pages named according to the `discussionpage` setting to be edited anonymously, even if `discussion => 0` is set. (If it respected the `discussion` option, the combination of `opendiscussion` and `moderatedcomments` might be good for blogs.) + +[[done]] --[[smcv]] diff --git a/doc/bugs/opendiscussion_should_respect_the_discussion_option/discussion.mdwn b/doc/bugs/opendiscussion_should_respect_the_discussion_option/discussion.mdwn new file mode 100644 index 000000000..a5c951671 --- /dev/null +++ b/doc/bugs/opendiscussion_should_respect_the_discussion_option/discussion.mdwn @@ -0,0 +1,26 @@ +This would be great to see fixed. It's perplexing to have discussion => 0 in my configuration, not have any discussion links on my site, but still be able to add a discussion page by URL hacking something like this: /cgi-bin/ikiwiki/ikiwiki.cgi?page=posts%2Fdiscussion&do=edit. + +spammers have figured that little trick out so I am consitently getting spammed checked into my git repository. + +I'm not really sure if this patch introduced other problems, but it seems to have fixed my site: + + 0 mcclelland@chavez:~/.ikiwiki/IkiWiki/Plugin$ diff -u /usr/share/perl5/IkiWiki/Plugin/opendiscussion.pm opendiscussion.pm + --- /usr/share/perl5/IkiWiki/Plugin/opendiscussion.pm 2012-05-07 11:31:24.000000000 -0400 + +++ opendiscussion.pm 2012-07-29 17:49:28.000000000 -0400 + @@ -25,7 +25,7 @@ + my $cgi=shift; + my $session=shift; + + - return "" if $page=~/(\/|^)\Q$config{discussionpage}\E$/i; + + return "" if $page=~/(\/|^)\Q$config{discussionpage}\E$/i && $config{discussion}; + return "" if pagespec_match($page, "postcomment(*)"); + return undef; + } + 1 mcclelland@chavez:~/.ikiwiki/IkiWiki/Plugin$ + +If libdir is configured to be ~/.ikiwiki in your ikiwiki.settings file, and you are running Debian, you can do the following: + + mkdir -p ~/.ikiwiki/IkiWiki/Plugin + cp /usr/share/perl5/IkiWiki/Plugin/opendiscussion.pm ~/.ikiwiki/IkiWiki/Plugin/ + +And then apply the patch above to ~/.ikiwiki/Ikiwiki/Plugin/opendiscussion.pm. diff --git a/doc/bugs/osm_KML_maps_do_not_display_properly_on_google_maps.mdwn b/doc/bugs/osm_KML_maps_do_not_display_properly_on_google_maps.mdwn new file mode 100644 index 000000000..2b20240c4 --- /dev/null +++ b/doc/bugs/osm_KML_maps_do_not_display_properly_on_google_maps.mdwn @@ -0,0 +1,14 @@ +[[!template id=gitbranch branch=anarcat/master author="[[anarcat]]"]] + +I know this sounds backwards, but it seems to me that the KML-generated map should be displayable on google maps. KML is the standard Google uses for google maps, and since we use it, we should interoperate with them. God knows why this is failing, but it is and should probably be fixed for the sake of interoperability: -- [[users/anarcat]] + +> The KML only needs a Document tag because it uses "shared styles" -- don't ask me what this is. Here is a [[patch]]: [[https://reseaulibre.deuxpi.ca/0001-Add-Document-tag-to-OSM-plugin-KML-output.patch]] --[[deuxpi]] + +> > I applied the patch to my master branch and tested it on the above URL: it works... mostly. The icons for the elements on the actual map seem incorrect (some are the proper icons, some others are the ugly default blue pin of google maps, weird) but I think this is a step in the right direction. Thus, this should be merged. -- [[anarcat]] + +>>> I've cherry-picked this patch, but from the description it does not +>>> sound "fixed" enough to close this bug. (OTOH, perhaps only google can +>>> fix it, so it people are happy with the state of affairs I won't insist +>>> this bug be left open.) --[[Joey]] + +> > > > I am happy with this right now, so let's mark this as [[done]]. I do agree this seems like a google bug, so let's move on. --[[anarcat]] diff --git a/doc/bugs/osm_KML_maps_icon_path_have_a_trailing_slash.mdwn b/doc/bugs/osm_KML_maps_icon_path_have_a_trailing_slash.mdwn new file mode 100644 index 000000000..0677d0e74 --- /dev/null +++ b/doc/bugs/osm_KML_maps_icon_path_have_a_trailing_slash.mdwn @@ -0,0 +1,32 @@ +This is not a problem on Apache webservers because they, oddly enough, ignore trailing slashes on paths (maybe some `PATH_INFO` magic, no idea). But basically, in our wiki, the paths to the icon tags are generated with a trailing slash. An excerpt of our [KML file](http://wiki.reseaulibre.ca/map/pois.kml): + + + +Notice the trailing `/` after the `icon.png`. This breaks display on nginx - the file that gets served isn't the icon, but the frontpage for some reason. I followed the [[setup instructions|tips/dot cgi]] for Nginx that I just had to write because there weren't any, so maybe I screwed up some part, but it does seem to me that the trailing slash is wrong regardless. + +(Also notice how the style tag is being turned over backwards by the HTML sanitizer here, cute. :P) + +I wrote a crude hack for this, but this strikes me as a similar problem to the one we found in [[bugs/osm linkto() usage breaks map rendering]]. However, I am at a loss how to fix this cleanly because we cannot `will_render()` the tag icons, as they are already generated out there! Weird. Anyways, here's the stupid [[patch]]: + +[[!format diff """ +diff --git a/IkiWiki/Plugin/osm.pm b/IkiWiki/Plugin/osm.pm +index a7baa5f..c9650d0 100644 +--- a/IkiWiki/Plugin/osm.pm ++++ b/IkiWiki/Plugin/osm.pm +@@ -192,6 +192,7 @@ sub process_waypoint { + } + } + $icon = urlto($icon, $dest, 1); ++ $icon =~ s!/*$!!; # hack - urlto shouldn't be appending a slash in the first place + $tag = '' unless $tag; + register_rendered_files($map, $page, $dest); + $pagestate{$page}{'osm'}{$map}{'waypoints'}{$name} = { +"""]] + +I'm not writing this to a branch out of sheer shame of my misunderstanding. ;) There also may be a workaround that could be done in Nginx too. --[[anarcat]] diff --git a/doc/bugs/osm_linkto__40____41___usage_breaks_map_rendering.mdwn b/doc/bugs/osm_linkto__40____41___usage_breaks_map_rendering.mdwn index 01d1ec8bc..89c08b73c 100644 --- a/doc/bugs/osm_linkto__40____41___usage_breaks_map_rendering.mdwn +++ b/doc/bugs/osm_linkto__40____41___usage_breaks_map_rendering.mdwn @@ -1,5 +1,23 @@ +[[!template id=gitbranch branch=anarcat/master author="[[anarcat]]"]] + Under some circumstances that remain unclear to me, the usage of `urlto()` in the revised version of the [[plugins/osm]] plugin break the map totally. The javascript console in Chromium tells me the following: GET http://mesh.openisp.ca/map/pois.kml/ 404 (Not Found) Indeed, that URL yields a 404. The proper URL is . --[[anarcat]] + +## Proposed solution + +The problem seems to be caused by `urlto()` being called for the `osm` +directive before the generated files are registered with `will_render()` +from the `waypoint` directive. Proposed patch adds a function that is +called from the `preprocess` hook for both directives that registers the +files. + +Here is a [[patch]] to IkiWiki/Plugin/osm.pm: + +--[[deuxpi]] + +I confirm the patch works, and I added it to my master branch. --[[anarcat]] + +> [[applied|done]]. Thanks guys. --[[Joey]] diff --git a/doc/bugs/pagetitle_function_does_not_respect_meta_titles.mdwn b/doc/bugs/pagetitle_function_does_not_respect_meta_titles.mdwn index c6e3cd4fd..15d28f989 100644 --- a/doc/bugs/pagetitle_function_does_not_respect_meta_titles.mdwn +++ b/doc/bugs/pagetitle_function_does_not_respect_meta_titles.mdwn @@ -279,3 +279,11 @@ So, looking at your meta branch: --[[Joey]] >>>> for the po plugin, because I want to merge the po plugin soon. >>>> If #2 gets tackled later, we will certianly have all kinds of fun. >>>> no matter what is done for the po plugin. --[[Joey]] + +>>>>> For the record: I've gotten used to the lack of this feature, +>>>>> and it now seems much less important to me than it was when +>>>>> initially developing the po plugin. So, I'm hereby officially +>>>>> removing this from my plate. If anyone else wants to start from +>>>>> scratch, or from my initial work, I'm happy to review the +>>>>> po-related part of things -- just drop me an email in this +>>>>> case. --[[intrigeri]] diff --git a/doc/bugs/possibly_po_related_error.mdwn b/doc/bugs/possibly_po_related_error.mdwn new file mode 100644 index 000000000..2a65ae606 --- /dev/null +++ b/doc/bugs/possibly_po_related_error.mdwn @@ -0,0 +1,20 @@ +A site got stuck like this: + +
    +/home/b-fusioninventory/public_html/documentation/index.es.html independently created, not overwriting with version from documentation.es
    +
    + +I tried rebuilding it, and the rebuild failed like this: + +
    +building recentchanges/change_ef4b9f92821335d96732c4b2c93ed96bc84c2f0d._change, which depends on templates/page.tmpl
    +removing recentchanges/change_9ca1de878ea654566ce4a8a031d1ad8ed135ea1c/index.html, no longer built by recentchanges/change_9ca1de878ea654566ce4a8a031d1ad8ed135ea1c
    +internal error: recentchanges/change_9ca1de878ea654566ce4a8a031d1ad8ed135ea1c._change cannot be found in /home/b-fusioninventory/source or underlay
    +
    + +This internal error seems like the root cause of the original failure. +ikiwiki crashed and did not record that it wrote the index.es.html file. + +Deleting the indexdb and rebuilding cleaned up the problem. + +This needs more investigation. --[[Joey]] diff --git a/doc/bugs/recentchanges_sets_has__95__diffurl__61__1_when_diffurl_is_empty.mdwn b/doc/bugs/recentchanges_sets_has__95__diffurl__61__1_when_diffurl_is_empty.mdwn new file mode 100644 index 000000000..6c6e24b02 --- /dev/null +++ b/doc/bugs/recentchanges_sets_has__95__diffurl__61__1_when_diffurl_is_empty.mdwn @@ -0,0 +1,18 @@ +recentchanges.pm sets the template variable HAS_DIFFURL to 1 based solely on whether or not diffurl is defined. I found that diffurl was defined, but empty. The recentchanges template depends on this for recentchangesdiff to properly function -- diff toggling is dependent on HAS_DIFFURL evaluating to false. Adding a check for a non-zero length diffurl fixed the issue for me. A patch against ikiwiki-3.20121212 is as follows: + + --- a/IkiWiki/Plugin/recentchanges.pm 2013-01-27 20:08:59.000000000 -0800 + +++ b/IkiWiki/Plugin/recentchanges.pm 2013-01-27 20:08:30.000000000 -0800 + @@ -181,7 +181,8 @@ sub store ($$$) { + else { + $_->{link} = pagetitle($_->{page}); + } + - if (defined $_->{diffurl}) { + + if (defined $_->{diffurl} && + + length($_->{diffurl}) > 0) { + $has_diffurl=1; + } + + +(There should be one more line at the bottom with a single space on it...) + +> [[applied|done]] --[[Joey]] diff --git a/doc/bugs/removal_of_transient_pages.mdwn b/doc/bugs/removal_of_transient_pages.mdwn index 4843b5900..6d0caf42e 100644 --- a/doc/bugs/removal_of_transient_pages.mdwn +++ b/doc/bugs/removal_of_transient_pages.mdwn @@ -65,7 +65,12 @@ inconsistent between the one-and two-argument forms. Thoughts? >> Try this, then? I had to make some changes to `attachment` >> to make the split versions available. I suggest reviewing >> patch-by-patch. ->> + +>>> Branch updated; I'd missed a use of prune in ikiwiki.in itself. +>>> Unfortunately, this means it does still need to support the +>>> "undefined top directory" case: there isn't an obvious top +>>> directory for wrappers. --[[smcv]] + >> I also tried to fix a related bug which I found while testing it: >> the special case for renaming held attachments didn't seem to work. >> (`smcv/wip/rename-held`.) Unfortunately, it seems that with that diff --git a/doc/bugs/search_plugin_finds_no_results_with_xapian_1.2.7.mdwn b/doc/bugs/search_plugin_finds_no_results_with_xapian_1.2.7.mdwn index 5509efefe..3bc430f68 100644 --- a/doc/bugs/search_plugin_finds_no_results_with_xapian_1.2.7.mdwn +++ b/doc/bugs/search_plugin_finds_no_results_with_xapian_1.2.7.mdwn @@ -8,3 +8,7 @@ I found that Debian stable is currently shipping 1.2.3, and on a hunch, I built > Debian has 1.2.7 now, and I have it installed and searching is working > fine with it. --[[Joey]] + +> I have this same issue. I tried xapian version 1.2.5. 1.2.8, 1.2.13. I will try and see if installing 1.2.3 fixes this issue. --[[Ramsey]] + +> 1.2.3 didn't fix the issue either --[[Ramsey]] diff --git a/doc/bugs/sidebar_not_updated_in_unedited_subpages.mdwn b/doc/bugs/sidebar_not_updated_in_unedited_subpages.mdwn new file mode 100644 index 000000000..c3e0ee18c --- /dev/null +++ b/doc/bugs/sidebar_not_updated_in_unedited_subpages.mdwn @@ -0,0 +1,9 @@ +I turned on the sidebar plugin, with global_sidebars on (in the web setup page), created a sidebar page in the root, and edited the sidebar a few times. + +I then noticed that all pages on the root had been updated with a sidebar, but no subpages (i.e. a/b). Only after editing a subpage did it get a sidebar. Editing sidebar itself only updated subpages with sidebars, the other subpages had not been refreshed (proven by their unchanged filesystem date) + +After calling ikiwiki --setup on the command line all pages were updated. So this seems to be a difference between web-started --setup and command-line --setup. Or it just doesn't work the first time --setup is called after sidebars are enabled. + + + + diff --git a/doc/bugs/template_creation_error.mdwn b/doc/bugs/template_creation_error.mdwn new file mode 100644 index 000000000..79dccc136 --- /dev/null +++ b/doc/bugs/template_creation_error.mdwn @@ -0,0 +1,111 @@ +Hi, +I am trying to build a template. The compilation of this template results in a weird exception. I have isolated the cause of the exception to the following point: + +If i have this in the template code: + +\[[!inline
    +pages="\"
    +template=extract-entry
    +\]]
    + +There is no problem at all. I can use the template with the desired result. But if I try to use this (just adding the "show" parameter): + +\[[!inline
    +pages="\"
    +template=extract-entry
    +show=\
    +\]]
    + +I get this exception on the Git bash console: + +
    +$ git push
    +Counting objects: 7, done.
    +Delta compression using up to 8 threads.
    +Compressing objects: 100% (4/4), done.
    +Writing objects: 100% (4/4), 410 bytes, done.
    +Total 4 (delta 3), reused 0 (delta 0)
    +remote: From /home/b-odelama-com/source
    +remote:    eb1421e..5e1bac5  master     -> origin/master
    +remote: Argument "\x{3c}\x{54}..." isn't numeric in numeric lt (<) at /usr/share/perl5/IkiWiki/Plugin/inline.pm line 231.
    +remote: Argument "\x{3c}\x{54}..." isn't numeric in numeric lt (<) at /usr/share/perl5/IkiWiki/Plugin/inline.pm line 231.
    +To ssh://b-odelama-com@odelama-com.branchable.com/
    +   eb1421e..5e1bac5  master -> master
    +
    + +Please, let me know what to do to avoid this kind of error. + +> When you add a template page `templates/foo.mdwn` for use +> the [[ikiwiki/directive/template]] directive, two things happen: +> +> 1. `\[[!template id=foo ...]]` becomes available; +> 2. a wiki page `templates/foo` is built, resulting in a HTML file, +> typically `templates/foo/index.html` +> +> The warnings you're seeing are the second of these: when ikiwiki +> tries to process `templates/foo.mdwn` as an ordinary page, without +> interpreting the `` directives, `inline` receives invalid +> input. +> +> This is a bit of a design flaw in [[plugins/template]] and +> [[plugins/edittemplate]], I think - ideally it would be possible to +> avoid parts of the page being interpreted when the page is being +> rendered normally rather than being used as a template. +> +> There *is* a trick to avoid parts of the page being interpreted when +> the page is being used as a template, while having them appear +> when it's rendered as a page: +> +> +> +> \[[!meta robots="noindex,nofollow"]] +> This template is used to describe a thing. Parameters: +> * name: the name of the thing +> * size: the size of the thing +> +> +> The thing is called and its size is +> +> I suppose you could maybe extend that to something like this: +> +> +> +> \[[!meta robots="noindex,nofollow"]] +> This template is used to describe a thing. Parameters: +> * name: the name of the thing +> * size: the size of the thing +> +> +> +> \[[!if test="included() and !included()" then=""" +> +> +> The thing is called and its size is +> +> """]] +> +> +> but that's far harder than it ought to be! +> +> Perhaps the right solution would be to change how the template plugin +> works, so that templates are expected to contain a new `definetemplate` +> directive: +> +> This template is used to describe a thing. Parameters: +> * name: the name of the thing +> * size: the size of the thing +> +> \[[!definetemplate """ +> The thing is called and its size is +> """]] +> +> with templates not containing a `\[[!definetemplate]]` being treated +> as if the whole text of the page was copied into a `\[[!definetemplate]]`, +> for backwards compatibility? +> +> --[[smcv]] diff --git a/doc/bugs/toc_displays_headings_from_sidebar.mdwn b/doc/bugs/toc_displays_headings_from_sidebar.mdwn new file mode 100644 index 000000000..469ca8a33 --- /dev/null +++ b/doc/bugs/toc_displays_headings_from_sidebar.mdwn @@ -0,0 +1,3 @@ +The [[/ikiwiki/directive/toc]] directive scrapes all headings from the page, including those in the sidebar. So, if the sidebar includes navigational headers, every page with a table of contents will display those navigational headers before the headers in that page's content. + +I'd like some way to exclude the sidebar from the table of contents. As discussed via Jabber, perhaps toc could have a config option to ignore headers inside a nav tag or a tag with id="sidebar". diff --git a/doc/bugs/trail_excess_dependencies.mdwn b/doc/bugs/trail_excess_dependencies.mdwn new file mode 100644 index 000000000..f806a62eb --- /dev/null +++ b/doc/bugs/trail_excess_dependencies.mdwn @@ -0,0 +1,95 @@ +I've just modified the trail plugin to use only presence, and not +content dependencies. Using content dependencies, particularly to the page +that defines the trail, meant that every time that page changed, *every* +page in the trail gets rebuilt. This leads to users setting up sites that +have horrible performance, if the trail is defined in, for example, the top +page of a blog. + +Unfortunatly, this change to presence dependencies has +introduced a bug. Now when an existing trail is removed, the pages in the +trail don't get rebuilt to remove the trail (both html display and state). + +> Actually, this particular case is usually OK. Suppose a trail `untrail` +> contains `untrail/a` (as is the case in the regression +> test I'm writing), and you build the wiki, then edit `untrail` to no +> longer be a trail, and refresh. `untrail` has changed, so it is +> rendered. Assuming that the template of either `untrail` or another +> changed page happens to contain the `TRAILS` variable (which is not +> guaranteed, but is highly likely), `I::P::t::prerender` +> is invoked. It notices that `untrail/a` was previously a trail +> member and is no longer, and rebuilds it with the diagnostic +> "building untrail/a, its previous or next page has changed". +> +> Strictly speaking, I should change `I::P::t::build_affected` +> so it calls `prerender`, so we're guaranteed to have done the +> recalculation. Fixed in my branch. --[[smcv]] + +I think that to fix this bug, the plugin should use a hook to +force rebuilding of all the pages that were in the trail, when +the trail is removed (or changed). + +> The case of "the trail is changed" is still broken: +> if the order of items changes, or the trail is removed, +> then the logic above means it's OK, but if you +> change the `\[[!meta title]]` of the trail, or anything else +> used in the prev/up/next bar, the items won't show that +> change. Fixed in my branch. --[[smcv]] + +There's a difficulty in doing that: The needsbuild hook runs before the scan +hook, so before it has a chance to see if the trail directive is still there. +It'd need some changes to ikiwiki's hooks. + +> That's what `build_affected` is for, and trail already used it. --s + +(An improvement in this area would probably simplify other plugins, which +currently abuse the needsbuild hook to unset state, to handle the case +where the directive that resulted in that state is removed.) + +I apologise for introducing a known bug, but the dependency mess was too +bad to leave as-is. And I have very little time (and regrettably, even less +power) to deal with it right now. :( --[[Joey]] + +[[!template id=gitbranch branch=smcv/ready/trail author="[[Simon_McVittie|smcv]]"]] +[[!tag patch]] + +> I believe my `ready/trail` branch fixes this. There are regression tests. +> +> Here is an analysis of how the trail pages interdepend. +> +> * If *trail* contains a page *member* which does exist, *member* depends +> on *trail*. This is so that if the trail directive is deleted from +> *trail*, or if *trail*'s "friendly" title or trail settings are changed, +> the trail navigation bar in *member* will pick up that change. This is +> now only a presence dependency, which isn't enough to make those happen +> correctly. [Edited to add: actually, the title is the only thing that +> can affect *member* without affecting the order of members.] +> +> * If *trail* contains consecutive pages *m1* and *m2* in that order, +> *m1* and *m2* depend on each other. This is so that if one's +> "friendly" title changes, the other is rebuilt. This is now only +> a presence dependency, which isn't enough to make those happen +> correctly. In my branch, I explicitly track the "friendly" title +> for every page that's edited and is involved in a trail somehow. +> +> * If *trail* has *member* in its `pagenames` but there is no page called +> *member*, then *trail* must be rebuilt if *member* is created. This +> was always a presence dependency, and is fine. +> +> In addition, the `trail` plugin remembers the maps +> { trail => next item in that trail } and { trail => previous item in +> that trail } for each page. If either changes, the page gets rebuilt +> by `build_affected`, with almost the same logic as is used to update +> pages that link to a changed page. My branch extends this to track the +> "friendly title" of each page involved in a trail, either by being +> the trail itself or a member (or both). +> +> I think it's true to say that the trail always depends on every member, +> even if it doesn't display them. This might mean that we can use +> "render the trail page" as an opportunity to work out whether any of +> its members are also going to need re-rendering? +> [Edited to add: actually, I didn't need this to be true, but I made the +> regression test check it anyway.] +> +> --[[smcv]] + +>>> Thanks **very** much! [[done]] --[[Joey]] diff --git a/doc/bugs/undefined_value_as_a_HASH_reference.mdwn b/doc/bugs/undefined_value_as_a_HASH_reference.mdwn new file mode 100644 index 000000000..228c3baac --- /dev/null +++ b/doc/bugs/undefined_value_as_a_HASH_reference.mdwn @@ -0,0 +1,68 @@ +Hello, + +does anyone have an idea why I see the following error when I run websetup (Setup button in Preferences)? + + Error: Can't use an undefined value as a HASH reference at /usr/share/perl5/IkiWiki/Plugin/websetup.pm line 82, line 97. + +Maybe, related to this is also + + $ ikiwiki --setup /etc/ikiwiki/auto-blog.setup + What will the blog be named? tmpblog + What revision control system to use? git + What wiki user (or openid) will be admin? wsh + + + Setting up tmpblog ... + Importing /home/wsh/tmpblog into git + Initialized empty shared Git repository in /home/wsh/tmpblog.git/ + Initialized empty Git repository in /home/wsh/tmpblog/.git/ + [master (root-commit) d6847e1] initial commit + 8 files changed, 48 insertions(+) + create mode 100644 .gitignore + create mode 100644 archives.mdwn + create mode 100644 comments.mdwn + create mode 100644 index.mdwn + create mode 100644 posts.mdwn + create mode 100644 posts/first_post.mdwn + create mode 100644 sidebar.mdwn + create mode 100644 tags.mdwn + Counting objects: 11, done. + Delta compression using up to 4 threads. + Compressing objects: 100% (9/9), done. + Writing objects: 100% (11/11), 1.53 KiB, done. + Total 11 (delta 0), reused 0 (delta 0) + Unpacking objects: 100% (11/11), done. + To /home/wsh/tmpblog.git + * [new branch] master -> master + Directory /home/wsh/tmpblog is now a clone of git repository /home/wsh/tmpblog.git + Reference found where even-sized list expected at /usr/share/perl5/IkiWiki/Setup.pm line 177, line 97. + Reference found where even-sized list expected at /usr/share/perl5/IkiWiki/Setup.pm line 224, line 97. + Use of uninitialized value $section in hash element at /usr/share/perl5/IkiWiki/Setup.pm line 226, line 97. + Use of uninitialized value $section in hash element at /usr/share/perl5/IkiWiki/Setup.pm line 227, line 97. + Use of uninitialized value $section in concatenation (.) or string at /usr/share/perl5/IkiWiki/Setup.pm line 233, line 97. + /etc/ikiwiki/auto-blog.setup: Can't use an undefined value as a HASH reference at /usr/share/perl5/IkiWiki/Setup.pm line 252, line 97. + + usage: ikiwiki [options] source dest + ikiwiki --setup configfile + +I'm on Debian unstable. + +Thanks, +-Michal + +> Some plugin has a broken getsetup hook, and is feeding a corrupted setup list in. Both the websetup and the auto.setup files cause all plugins to be loaded and all their setup to be available. +> +> This command will help you find the plugin. Here it prints some noise around the rst plugin, for unrelated reasons, +> but what you're looking for is the plugin printed before the "even sized list" message. + +
    +perl -le 'use warnings; use strict; use Data::Dumper; use IkiWiki; %config=IkiWiki::defaultconfig(); use IkiWiki::Setup; my @s=IkiWiki::Setup::getsetup(); foreach my $pair (@s) { print "plugin ".$pair->[0]; my $setup=$pair->[1]; if ($pair->[0] eq "rst") { print Dumper($setup)} my %s=@{$setup} }'
    +
    + +> I was able to replicate this by making a plugin's getsetup hook return a list reference, rather than a list, +> and have put in a guard against that sort of thing. +> --[[Joey]] + +>> Thanks. Your command didn't helped me, but with trial and error approach I found that the victim an old version asciidoc plugin. For some reason, asciidoc was never listed in the output of the command. --[[wentasah]] + +>>> Ok. My fix should prevent the problem, so [[done]] --[[Joey]] diff --git a/doc/bugs/wiki_links_still_processed_inside_code_blocks.mdwn b/doc/bugs/wiki_links_still_processed_inside_code_blocks.mdwn index b2a8b0632..9f0a1d102 100644 --- a/doc/bugs/wiki_links_still_processed_inside_code_blocks.mdwn +++ b/doc/bugs/wiki_links_still_processed_inside_code_blocks.mdwn @@ -46,4 +46,22 @@ and have it render like: > there should give some strong hints how to fix this bug, though I haven't > tried to apply the method yet. --[[Joey]] +>> As far, as I can see, smileys bug is solved by checking for code/pre. In +>> this case, however, this is not applicable. WikiLinks/directives *should* be +>> expanded before passing text to formatter, as their expansion may contain +>> markup. Directives should be processed before, as they may provide *partial* +>> markup (eg `template` ones), that have no sense except when in the page +>> cotext. Links should be processed before, because, at least multimarkdown may +>> try to expand them as anchor-links. +>> +>> For now, my partial solution is to restrict links to not have space at the +>> start, this way in many cases escaping in code may be done in natural way +>> and not break copypastability. For example, shell 'if \[[ condition ]];' +>> will work fine with this. +>> +>> Maybe directives can also be restricted to only be allowed on the line by +>> themselves (not separated by blank lines, however) or something similar. +>> +>> --[[isbear]] + [[!debbug 487397]] diff --git a/doc/bugs/yaml:xs_codependency_not_listed.mdwn b/doc/bugs/yaml:xs_codependency_not_listed.mdwn new file mode 100644 index 000000000..f136d8b12 --- /dev/null +++ b/doc/bugs/yaml:xs_codependency_not_listed.mdwn @@ -0,0 +1,13 @@ +YAML:XS is not listed as a dep in the spec file which results in + +``` +HOME=/home/me /usr/bin/perl -Iblib/lib ikiwiki.in -dumpsetup ikiwiki.setup +Can't locate YAML/XS.pm in @INC (@INC contains: . blib/lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at (eval 39) line 2. +BEGIN failed--compilation aborted at (eval 39) line 2. +make: *** [ikiwiki.setup] Error 2 +error: Bad exit status from /var/tmp/rpm-tmp.Sgq2QK (%build) +``` + +when trying to build + +> Ok, added. [[done]] --[[Joey]] diff --git a/doc/contact.mdwn b/doc/contact.mdwn index 486a4d186..7d31ddf10 100644 --- a/doc/contact.mdwn +++ b/doc/contact.mdwn @@ -4,7 +4,7 @@ ikiwiki's own wiki. ikiwiki provides a [[bug_tracker|bugs]], a [[TODO_list|TODO]], and "discussion" sub-pages for every page, as well as a [[forum]] for general questions and discussion. ikiwiki developers monitor [[RecentChanges]] closely, via the webpage, email, -[CIA](http://cia.navi.cx), and IRC, and respond in a timely fashion. +and IRC, and respond in a timely fashion. You could also drop by the IRC channel `#ikiwiki` on [OFTC](http://www.oftc.net/) (`irc.oftc.net`), or use the diff --git a/doc/examples/softwaresite/bugs/hghg.mdwn b/doc/examples/softwaresite/bugs/hghg.mdwn new file mode 100644 index 000000000..cece64126 --- /dev/null +++ b/doc/examples/softwaresite/bugs/hghg.mdwn @@ -0,0 +1 @@ +hghg diff --git a/doc/forum/Background_picture_and_css.mdwn b/doc/forum/Background_picture_and_css.mdwn new file mode 100644 index 000000000..827100984 --- /dev/null +++ b/doc/forum/Background_picture_and_css.mdwn @@ -0,0 +1,8 @@ +Is it possible to put two different background pictures into the right and left sides of the following ikiwiki css? + +[lessish css theme](https://raw.github.com/spiffin/ikiwiki_lessish/master/lessish.css) + +Is it also possible to have a background like this: [http://ysharifi.wordpress.com/](http://ysharifi.wordpress.com/) +or this [tex.stackexchange.com](tex.stackexchange.com) + +I am not a css expert so, it would be nice if you could provide some details. diff --git a/doc/forum/CGI_script_and_HTTPS.mdwn b/doc/forum/CGI_script_and_HTTPS.mdwn new file mode 100644 index 000000000..2f255002d --- /dev/null +++ b/doc/forum/CGI_script_and_HTTPS.mdwn @@ -0,0 +1,29 @@ +Dear ikiwiki folks, + +using Debian Wheezy and ikiwiki 3.20120629 for some reason when accessing the site using HTTP (and not HTTPS), going to Edit, so executing the CGI script, all URLs are prepended with HTTPS, which I do not want. + + + +Trying to look at the source, I guess it is originating from `IkiWiki/CGI.pm`. + + sub printheader ($) { + my $session=shift; + + if (($ENV{HTTPS} && lc $ENV{HTTPS} ne "off") || $config{sslcookie}) { + print $session->header(-charset => 'utf-8', + -cookie => $session->cookie(-httponly => 1, -secure => 1)); + } + else { + print $session->header(-charset => 'utf-8', + -cookie => $session->cookie(-httponly => 1)); + } + } + +Does it check if HTTPS is enabled in the environment? During `ikiwiki --setup example.setup` or when the CGI script is run when the site is accessed (for example in an Apache environment)? + +Can this somehow be disabled in ikiwiki. Reading the code I guess I could somehow set `HTTPS = off` somewhere in the `VirtualHost` section of the Apache configuration. + + +Thanks, + +--[[PaulePanter]] diff --git a/doc/forum/CGI_script_and_HTTPS/comment_1_3f8ef438ca7de11635d4e40080e7baa9._comment b/doc/forum/CGI_script_and_HTTPS/comment_1_3f8ef438ca7de11635d4e40080e7baa9._comment new file mode 100644 index 000000000..03f1032e9 --- /dev/null +++ b/doc/forum/CGI_script_and_HTTPS/comment_1_3f8ef438ca7de11635d4e40080e7baa9._comment @@ -0,0 +1,43 @@ +[[!comment format=mdwn + username="http://smcv.pseudorandom.co.uk/" + nickname="smcv" + subject="comment 1" + date="2012-11-05T11:27:02Z" + content=""" +IkiWiki generates self-referential URLs using the `url` and `cgiurl` +configuration parameters, and the `urlto()` and `cgiurl()` functions; +the code you quoted isn't involved (it's choosing whether to set +HTTPS-only cookies or not, rather than choosing how to generate +self-referential URLs). + +If you want your wiki to be accessible via both HTTP and HTTPS, and use +whichever the user first requested, you should set both `url` and +`cgiurl` to the same URI scheme and hostname with no port specified, +either both `http` or both `https`, for instance: + + url: http://www.example.com/ + cgiurl: http://www.example.com/ikiwiki.cgi + +or + + url: https://example.org/wiki/ + cgiurl: https://example.org/cgi-bin/ikiwiki + +(or the Perl-syntax equivalents if you're not using a YAML +setup file). + +If you use one of those, IkiWiki will attempt to generate +path-only links, like \"/wiki/\" and \"/cgi-bin/ikiwiki?...\", +whenever it's valid to do so. A visitor using HTTP will stay +on HTTP and a visitor using HTTPS will stay on HTTPS. + +The choice of `http` or `https` for the `url` and `cgiurl` +still matters when a URL *must* be absolute, such as in an +RSS feed. + +I improved this code in late 2010 for this todo item: +[[todo/want_to_avoid_ikiwiki_using_http_or_https_in_urls_to_allow_serving_both]]. +It's possible that it has regressed (that's happened +a couple of times). If it has, please quote your exact +`url` and `cgiurl` configuration. +"""]] diff --git a/doc/forum/Calendar:_listing_multiple_entries_per_day.mdwn b/doc/forum/Calendar:_listing_multiple_entries_per_day.mdwn index ebea43697..251cd6d9f 100644 --- a/doc/forum/Calendar:_listing_multiple_entries_per_day.mdwn +++ b/doc/forum/Calendar:_listing_multiple_entries_per_day.mdwn @@ -15,3 +15,5 @@ I'm not sure how I go about swapping the link on the day number to a link to, I and a suitable whilst loop looks to be all that's needed... Any pointers appreciated. + +A [[!taglink patch]] has been proposed in [comment](#comment-d6f94e2b779d1c038b6359aad79ed14b) diff --git a/doc/forum/Can_ikiwiki_be_configured_as_multi_user_blog__63__.mdwn b/doc/forum/Can_ikiwiki_be_configured_as_multi_user_blog__63__.mdwn new file mode 100644 index 000000000..118b534ed --- /dev/null +++ b/doc/forum/Can_ikiwiki_be_configured_as_multi_user_blog__63__.mdwn @@ -0,0 +1,7 @@ +All the ikiwiki blogs I have seen have a single user blog. Is it possible to give every user a blog, where they can create their own pages in their own directory = based on their user name? + +I feel that a wiki might give more options in the way users share and collaborate when compared to a blog engine (like Word Press in multi user format) + +Is this the best place to post a question like this? There doesn't seem to be much traffic in this forum +Thanks for your help +Richard diff --git a/doc/forum/Email_notifications_for_comment_moderation.mdwn b/doc/forum/Email_notifications_for_comment_moderation.mdwn new file mode 100644 index 000000000..6a840ce53 --- /dev/null +++ b/doc/forum/Email_notifications_for_comment_moderation.mdwn @@ -0,0 +1,3 @@ +I use both [[plugins/moderatedcomments/]] and [[plugins/anonok]] on my [blog](http://feeding.cloud.geek.nz) but having to remember to visit the comment moderation page manually is not ideal. + +Is there a way to get an email notification (or maybe even just an RSS feed) whenever a new comment enters the moderation queue? diff --git a/doc/forum/Email_notifications_for_comment_moderation/comment_1_668bf6a21310dcc8b882bc60a130ba06._comment b/doc/forum/Email_notifications_for_comment_moderation/comment_1_668bf6a21310dcc8b882bc60a130ba06._comment new file mode 100644 index 000000000..06140728e --- /dev/null +++ b/doc/forum/Email_notifications_for_comment_moderation/comment_1_668bf6a21310dcc8b882bc60a130ba06._comment @@ -0,0 +1,12 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawm6VdLM7IKcNgkDiJ2YKHpcWli9bRLsZDk" + nickname="Oscar" + subject="How to get a comment moderation feed" + date="2013-02-25T18:04:21Z" + content=""" +I was looking for the same subject and I have found the following: + +http://ikiwiki.info/tips/comments_feed/ + + +"""]] diff --git a/doc/forum/Error:_CGI::tmpFileName_failed_to_return_the_uploaded_file_name.mdwn b/doc/forum/Error:_CGI::tmpFileName_failed_to_return_the_uploaded_file_name.mdwn new file mode 100644 index 000000000..ad52c0091 --- /dev/null +++ b/doc/forum/Error:_CGI::tmpFileName_failed_to_return_the_uploaded_file_name.mdwn @@ -0,0 +1,11 @@ +I tried to upload a file to my wiki last week, and got this error: + + Error: CGI::tmpFileName failed to return the uploaded file name + +This used to work, and I honestly don't know what could have changed to screw it up. + +I see that there's a lot of frustrated comments around this particular block of code in `attachment.pm`; so, for the record, I'm on Debian 6, using perl `5.10.1-17squeeze4`. + +Any thoughts? + +~jonathon diff --git a/doc/forum/Error:_CGI::tmpFileName_failed_to_return_the_uploaded_file_name/comment_1_66c321b9eb618d20872cee7d6ca9e44c._comment b/doc/forum/Error:_CGI::tmpFileName_failed_to_return_the_uploaded_file_name/comment_1_66c321b9eb618d20872cee7d6ca9e44c._comment new file mode 100644 index 000000000..fb499004e --- /dev/null +++ b/doc/forum/Error:_CGI::tmpFileName_failed_to_return_the_uploaded_file_name/comment_1_66c321b9eb618d20872cee7d6ca9e44c._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawlRjjrKEyPmXnh2qBEGx9PgH5DP32wCMAQ" + nickname="Jonathon" + subject="ikiwiki version" + date="2013-01-02T14:59:19Z" + content=""" +I should also identify that I'm using ikiwiki `3.20100815.9`. +"""]] diff --git a/doc/forum/Error:_CGI::tmpFileName_failed_to_return_the_uploaded_file_name/comment_2_80296d67c7f1dd75b56b85c14f5efa3b._comment b/doc/forum/Error:_CGI::tmpFileName_failed_to_return_the_uploaded_file_name/comment_2_80296d67c7f1dd75b56b85c14f5efa3b._comment new file mode 100644 index 000000000..e7659413e --- /dev/null +++ b/doc/forum/Error:_CGI::tmpFileName_failed_to_return_the_uploaded_file_name/comment_2_80296d67c7f1dd75b56b85c14f5efa3b._comment @@ -0,0 +1,12 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawlRjjrKEyPmXnh2qBEGx9PgH5DP32wCMAQ" + nickname="Jonathon" + subject="figured it out" + date="2013-01-19T15:59:09Z" + content=""" +It looks like this was just another expression of [the header size limit issue] [1] that has already been reported and addressed. + +I got `3.20120629` from `squeeze-backports`, and my issue has been resolved. + +[1]: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=638009 +"""]] diff --git a/doc/forum/Forward_slashes_being_escaped_as_252F/comment_1_7702cf6d354ab600d6643b075b9f09da._comment b/doc/forum/Forward_slashes_being_escaped_as_252F/comment_1_7702cf6d354ab600d6643b075b9f09da._comment new file mode 100644 index 000000000..7c9ccbca1 --- /dev/null +++ b/doc/forum/Forward_slashes_being_escaped_as_252F/comment_1_7702cf6d354ab600d6643b075b9f09da._comment @@ -0,0 +1,12 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawm6gCEo_Z36OJ7x5kyZn52lEVvyjn3zSUc" + nickname="Ángel" + subject="comment 1" + date="2013-05-31T16:03:03Z" + content=""" +Simply add the NE (No escape) flag: + +RewriteEngine on +RewriteCond %{HTTP_HOST} ^www\.ciffer\.net$ +RewriteRule /(.*) http://ciffer.net/$1 [L,R,NE] +"""]] diff --git a/doc/forum/How_can_I_prevent_spam__63__.mdwn b/doc/forum/How_can_I_prevent_spam__63__.mdwn new file mode 100644 index 000000000..44e31927e --- /dev/null +++ b/doc/forum/How_can_I_prevent_spam__63__.mdwn @@ -0,0 +1,17 @@ +I am getting continuous spam like this: + + discussion 85.25.146.11 web 11:02:19 05/17/13 2rand[0,1,1] + discussion 85.25.146.11 web 11:02:13 05/17/13 2rand[0,1,1] + +The bot uses an IP address as the username and puts '2rand[0,1,1]' as comment text. + +I do not have a page 'discussion' in use, so I have redirected this page with an apache2 +Alias to a static page, just in case anyone stumbles on it. This means it cannot really +be edited via the web. However the bots that post +this spam are evidently not opening the page to edit it, but merely sending a cgi request +as if they had edited the page. The result is that no damage is done on the site and no +benefit is achieved for the spammer since google cannot see the result. However, the +logs are stuffed with spurious entries and a page is constantly recompiled, which wastes +resources. + +Is there some way to reject edits that do not arise from an established session? diff --git a/doc/forum/How_can_I_prevent_spam__63__/comment_1_fd26fb7f1569e8c44ba8262794f938db._comment b/doc/forum/How_can_I_prevent_spam__63__/comment_1_fd26fb7f1569e8c44ba8262794f938db._comment new file mode 100644 index 000000000..a7293288c --- /dev/null +++ b/doc/forum/How_can_I_prevent_spam__63__/comment_1_fd26fb7f1569e8c44ba8262794f938db._comment @@ -0,0 +1,19 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + nickname="joey" + subject="comment 1" + date="2013-05-17T17:55:46Z" + content=""" +Normally ikiwiki requires a valid session cookie of a logged in user to edit pages. It sounds like you may have the opendiscussion or anonok plugins enabled, which allows anyone to edit without logging in. Recommend disabling them. + +Since you know the spammer's IP, put it into ikiwiki.setup: + +
    +banned_users:
    +  - ip(85.25.146.11)
    +
    + +If the user was logging in, you could also put their username in the ban list. + +You can also try enabling the blogspam plugin. +"""]] diff --git a/doc/forum/How_can_I_prevent_spam__63__/comment_2_d098124f005976ee815d25c883bc9106._comment b/doc/forum/How_can_I_prevent_spam__63__/comment_2_d098124f005976ee815d25c883bc9106._comment new file mode 100644 index 000000000..53e743361 --- /dev/null +++ b/doc/forum/How_can_I_prevent_spam__63__/comment_2_d098124f005976ee815d25c883bc9106._comment @@ -0,0 +1,16 @@ +[[!comment format=mdwn + username="http://claimid.com/richard-lyons" + nickname="richard-lyons" + subject="comment 2" + date="2013-05-17T20:56:23Z" + content=""" +I did indeed have opendiscussion active. I shall wait to see what happens after disabling it. + +The bots seem to make 5 consecutive edits at short intervals (around 2 minutes) using an IP +address as a username. I do not know if the IP is the one from which they work. There are +usually two or three sets of five edits using different IP addresses as username in each hour. + +I did try blocking specific IPs but they constantly change. + +It would be good if blocking could match a regexp, but as far as I can see this is not an option, +"""]] diff --git a/doc/forum/How_can_I_prevent_spam__63__/comment_3_deb434d01aaefa18d2791e48d6c824ae._comment b/doc/forum/How_can_I_prevent_spam__63__/comment_3_deb434d01aaefa18d2791e48d6c824ae._comment new file mode 100644 index 000000000..64783befc --- /dev/null +++ b/doc/forum/How_can_I_prevent_spam__63__/comment_3_deb434d01aaefa18d2791e48d6c824ae._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="http://claimid.com/richard-lyons" + nickname="richard-lyons" + subject="SOLVED -- How can I prevent spam?" + date="2013-05-18T08:13:19Z" + content=""" +I can now confirm that this particular attack has stopped after removing the opendiscussion plugin. +"""]] diff --git a/doc/forum/How_do_I_enable_OpenID__63__.mdwn b/doc/forum/How_do_I_enable_OpenID__63__.mdwn new file mode 100644 index 000000000..a4e1a4531 --- /dev/null +++ b/doc/forum/How_do_I_enable_OpenID__63__.mdwn @@ -0,0 +1 @@ +I'm trying to set up a new ikiwiki based blog and I want commentors to be able to log in with OpenID. To enable OpenID I installed Net::OpenID::Consumer, and enabled the openid plugin in my blog.setup file and ran the ikiwiki --setup command. Despite doing that I still only see the username and password in the login screen. What am I missing? diff --git a/doc/forum/How_to_add_additional_links_to_the_gray_horizontable_bar_under_page_title__63__.mdwn b/doc/forum/How_to_add_additional_links_to_the_gray_horizontable_bar_under_page_title__63__.mdwn new file mode 100644 index 000000000..537ba6161 --- /dev/null +++ b/doc/forum/How_to_add_additional_links_to_the_gray_horizontable_bar_under_page_title__63__.mdwn @@ -0,0 +1,3 @@ +How to add additional links to the gray horizontable bar under page title? + +What I meant by the gray horizontable bar shows "Edit RecentChanges Preferences". I want to disable those three but add some other links to other pages in my website. diff --git a/doc/forum/How_to_add_additional_links_to_the_gray_horizontable_bar_under_page_title__63__/comment_1_f2e52d38f60888c7d5142de853123540._comment b/doc/forum/How_to_add_additional_links_to_the_gray_horizontable_bar_under_page_title__63__/comment_1_f2e52d38f60888c7d5142de853123540._comment new file mode 100644 index 000000000..1bb3fa7cb --- /dev/null +++ b/doc/forum/How_to_add_additional_links_to_the_gray_horizontable_bar_under_page_title__63__/comment_1_f2e52d38f60888c7d5142de853123540._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawmb2CAGUNU_Kx6YSImD2ox6MtjuaM6Jp1E" + nickname="Nicolas" + subject="comment 1" + date="2012-11-09T08:34:42Z" + content=""" +You could use custom templates and hardcode those links there. +"""]] diff --git a/doc/forum/How_to_add_link_to_previous_and_next_blog_on_blog_pages__63__.mdwn b/doc/forum/How_to_add_link_to_previous_and_next_blog_on_blog_pages__63__.mdwn new file mode 100644 index 000000000..3f771e777 --- /dev/null +++ b/doc/forum/How_to_add_link_to_previous_and_next_blog_on_blog_pages__63__.mdwn @@ -0,0 +1,14 @@ +In a Ikiwiki instance, I made a subdirectory to hold blog pages + + /website + blog.mdwn + ... + + /website/blog + /website/blog/blog1.mdwn + /website/blog/blog2.mdwn + ... + +On blog.mdwn, reader by default see the last 10 posts, but it seems there is no link to blog pages older than that. What's a good way to make titles of blog pages older also somehow visible to reader at the blog front page `blog.mdwn`? + +On any individual blog page such as `blog1.mdwn`, there is not a link to the blog pages immediately before and after it. How to make such links? diff --git a/doc/forum/How_to_add_link_to_previous_and_next_blog_on_blog_pages__63__/comment_1_aad510f45be505efaabcb6fb860665a4._comment b/doc/forum/How_to_add_link_to_previous_and_next_blog_on_blog_pages__63__/comment_1_aad510f45be505efaabcb6fb860665a4._comment new file mode 100644 index 000000000..ce99b8475 --- /dev/null +++ b/doc/forum/How_to_add_link_to_previous_and_next_blog_on_blog_pages__63__/comment_1_aad510f45be505efaabcb6fb860665a4._comment @@ -0,0 +1,23 @@ +[[!comment format=mdwn + username="http://smcv.pseudorandom.co.uk/" + nickname="smcv" + subject="use trail=yes, and an extra inline with archive=yes" + date="2012-08-04T17:22:18Z" + content=""" +To get just the titles of older posts, you want an inline with +`archive=\"yes\"`, probably one that skips the same number of posts +displayed in full: + + [[!inline pages=\"blog/* and !*/Discussion\" + skip=\"10\" feeds=\"no\" archive=\"yes\"]] + +To get 'next' and 'previous' links on each post, use a recent +IkiWiki version, enable the [[plugins/trail]] plugin and add +`trail=\"yes\"` to your main inline: + + [[!inline pages=\"blog/* and !*/Discussion\" + show=\"10\" trail=\"yes\"]] + +For instance see +[my blog](http://git.pseudorandom.co.uk/pseudorandom.co.uk/smcv.git/blob/83e9a713d77778b58460ed04f6c48665d817f3cd:/index.mdwn). +"""]] diff --git a/doc/forum/How_to_add_link_to_previous_and_next_blog_on_blog_pages__63__/comment_2_ee65792a5b796caa216f4e7a653fc668._comment b/doc/forum/How_to_add_link_to_previous_and_next_blog_on_blog_pages__63__/comment_2_ee65792a5b796caa216f4e7a653fc668._comment new file mode 100644 index 000000000..5546c4789 --- /dev/null +++ b/doc/forum/How_to_add_link_to_previous_and_next_blog_on_blog_pages__63__/comment_2_ee65792a5b796caa216f4e7a653fc668._comment @@ -0,0 +1,23 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawmKyeW2G4jjSdnL1m6kPPtAiGFUBsnYCfY" + nickname="FName" + subject="How to install the trail package?" + date="2012-08-09T00:11:26Z" + content=""" +I tried putting + +trail + +in + + add_plugins => [qw{ + ... + trail + ... + }] + +in site.setup and rebuild. It gives error + + Failed to load plugin IkiWiki::Plugin::trail: Can't locate IkiWiki/Plugin/trail.pm in @IN ... + +"""]] diff --git a/doc/forum/How_to_generate_blog_archive_pages_in___47__blog_subdir_but_not_ikiwiki_root_path__63__.mdwn b/doc/forum/How_to_generate_blog_archive_pages_in___47__blog_subdir_but_not_ikiwiki_root_path__63__.mdwn new file mode 100644 index 000000000..e4901d78b --- /dev/null +++ b/doc/forum/How_to_generate_blog_archive_pages_in___47__blog_subdir_but_not_ikiwiki_root_path__63__.mdwn @@ -0,0 +1,26 @@ +My Ikiwiki and blog has structure + + /website + blog.mdwn + ... + + /website/blog + /website/blog/blog1.mdwn + /website/blog/blog2.mdwn + ... + +After running + + ikiwiki-calendar ./foo.setup "/blog/*" + +I got a + + /website/archives/ + +and archive pages in it. + +I'd like to have it in + + /website/blog/archives/ + +as those are archive pages for blog pages only. How to do it? diff --git a/doc/forum/How_to_set_up_a_page_as_internal__63__.mdwn b/doc/forum/How_to_set_up_a_page_as_internal__63__.mdwn new file mode 100644 index 000000000..ed771292d --- /dev/null +++ b/doc/forum/How_to_set_up_a_page_as_internal__63__.mdwn @@ -0,0 +1,5 @@ +I have a folder with few administrative tasks, like a page showing the comments waiting for moderation. + +There is no link from "normal/public" pages in my site to this administrative pages, but it doesn't prevent the possibility of any person writing down that address in the browser address-bar or finding that address in the browser navigation history. + +Please, is there any way or best-practice restricting the access to this kind of pages? I know that these pages will eventually ask the user to log-in as admin, but I don't want them to see this stuff. diff --git a/doc/forum/How_to_set_up_git_repository_hook___63__.mdwn b/doc/forum/How_to_set_up_git_repository_hook___63__.mdwn new file mode 100644 index 000000000..34bc4ace2 --- /dev/null +++ b/doc/forum/How_to_set_up_git_repository_hook___63__.mdwn @@ -0,0 +1,19 @@ +Hi, + +I want to set up hooks for Git, and I don't know how to. Is there any documentation somewhere? Basically, I'd like to do what [[/ikiwiki-makerepo]] does, but manually. + +Why? Because I want to have a special layout to my repository. Especially, I want to include at the root level some special files: + +- the nginx configuration +- the script that installs the nginx configuration to the system +- the script that starts the fast-cgi wrapper +- the `ikiwiki.setup` file +- ... + +And I want the ikiwiki sources to be in a subdirectory `src/` and the generated files in `out/` (where the nginx configuration points). + +So, what is the special `post-update` hook generated by [[/ikiwiki-makerepo]]? I noticed it was an ELF file, why not a script? What does it do? + +Thanks, + +Mildred diff --git a/doc/forum/How_to_style_main_sidebar_and_SubPage_sidebar_differently_using_CSS__63__.mdwn b/doc/forum/How_to_style_main_sidebar_and_SubPage_sidebar_differently_using_CSS__63__.mdwn new file mode 100644 index 000000000..09cf01435 --- /dev/null +++ b/doc/forum/How_to_style_main_sidebar_and_SubPage_sidebar_differently_using_CSS__63__.mdwn @@ -0,0 +1,13 @@ +How to style main sidebar and SubPage sidebar differently using CSS? + +I have a main sidebar + + /sidebar.mdwn + +and a SubPage sidebar + + /blog/sidebar.mdwn + +How to style the two differently using CSS? + +For example I'd like the sidebar shown on any page inside /blog to have a blue border and any other page outside of /blog to have a sidebar with red border. diff --git a/doc/forum/Ikiwiki_themes_for_mobile_devices__63__.mdwn b/doc/forum/Ikiwiki_themes_for_mobile_devices__63__.mdwn new file mode 100644 index 000000000..dc1b31cd8 --- /dev/null +++ b/doc/forum/Ikiwiki_themes_for_mobile_devices__63__.mdwn @@ -0,0 +1,7 @@ +Has anyone else created ikiwiki themes for mobile devices like phones and tablets? + +I've been using Blueview theme for a few years and finally tried to adapt the theme for my phone. +My local.css is [here](http://mcfrisk.kapsi.fi/local.css), and my hobby web page full of images and videos [here](http://mcfrisk.kapsi.fi/skiing/). + +Previously I also had problems like wasted screen space, big minimum width and images not scaled down to the CSS element. Those got fixed as well. +Would be nice if others could test that and maybe share their setups. diff --git a/doc/forum/Multiple_urls.mdwn b/doc/forum/Multiple_urls.mdwn new file mode 100644 index 000000000..03125d27c --- /dev/null +++ b/doc/forum/Multiple_urls.mdwn @@ -0,0 +1,8 @@ +Hi, +Is there a way of making a given ikiwiki instance accessible both from the LAN where it's server is and from the WAN? + +Say I have ikiwiki installed on a server connected to a router. That router has port forwarding and dyndns configured so I could open ikiwiki from outside the LAN. Trying to open normal ikiwiki pages, from outside the LAN, or with a proxy, works. However, the Editing and Preferences pages, for example, redirect to http://192.168.x.x/~username/ikiwiki/ikiwiki.cgi?page=posts%2Fhello_world&do=edit (in the case of the edit page), which of course only exists inside the LAN, and fails loading. + +Editing the "url" and "cgiurl" directives in the .setup file to point to the dyndns address makes it work from the outside, but I can't edit the pages from inside the LAN anymore with this configuration. The normal pages, once again, are accessible. Edit or Preferences, on the other hand, redirect to the public address, which I can't open from inside the same LAN it points to. + +For this reason I ask, is there an way to have multiple urls point to the same ikiwiki page, namely a LAN IP url and a public IP one? Thanks in advance. diff --git a/doc/forum/Multiple_urls/comment_1_e4c1256346d5a421161c20e344d8bada._comment b/doc/forum/Multiple_urls/comment_1_e4c1256346d5a421161c20e344d8bada._comment new file mode 100644 index 000000000..9806f5376 --- /dev/null +++ b/doc/forum/Multiple_urls/comment_1_e4c1256346d5a421161c20e344d8bada._comment @@ -0,0 +1,22 @@ +[[!comment format=mdwn + username="http://kerravonsen.dreamwidth.org/" + ip="60.241.8.244" + subject="A Few Ways To Do This" + date="2012-10-09T02:02:09Z" + content=""" +I don't think one can alter IkiWiki to have multiple URLs, because the URL is built in to the CGI when the CGI is generated. + +1. Use the external hostname (say, foo.com) for the URL, and tell your local machine that foo.com has an IP of 192.168.x.x, thus making it accessible from within the LAN. +2. Give the URL as a relative-absolute URL; that is, rather than \"http://foo.com/ikiwiki.cgi\" give it as \"/ikiwiki.cgi\". This doesn't always work, though. +3. Build two versions of the site from the same git repo. One for access from inside, and one for access from outside. Both setup files would need to be identical, apart from + + * the destination directory + * the URLs + * the git-update file name; one would need to call it something other than post-update. + + Then one would make a new \"post-update\" file which calls *both* of the ikiwiki post-update scripts, so that both versions of the site are updated when you make a change. + Then set up your web-server to point to the \"external\" directory for the external site, and the \"internal\" directory for the internal site; easy enough to do if you use virtual hosts. + +Yes, I know the third one is somewhat complex... I use the idea myself in order to make two versions of a site where one is editable and the other is not, but that's not what you're aiming for, I know. + +"""]] diff --git a/doc/forum/Need_something_more_powerful_than_Exclude/comment_6_1dccdfebad31446200213a2cae25f0e2._comment b/doc/forum/Need_something_more_powerful_than_Exclude/comment_6_1dccdfebad31446200213a2cae25f0e2._comment new file mode 100644 index 000000000..d93684d10 --- /dev/null +++ b/doc/forum/Need_something_more_powerful_than_Exclude/comment_6_1dccdfebad31446200213a2cae25f0e2._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawkiulxucQx_YZQZUVJdNF6oMaZwWb8JF2M" + nickname="Martin" + subject="Reproduced" + date="2012-07-25T02:23:13Z" + content=""" +I also encountered this bug (having to delete indexdb) in 3.20120629. + +-- Martin +"""]] diff --git a/doc/forum/Problem_with_local_git_commit.mdwn b/doc/forum/Problem_with_local_git_commit.mdwn new file mode 100644 index 000000000..e9dfdb417 --- /dev/null +++ b/doc/forum/Problem_with_local_git_commit.mdwn @@ -0,0 +1,42 @@ +I have a problem when I edit my wiki with a text editor and use just git to commit. + +Suppose `iki` is my scrdir and `iki.git` my repository. Then I did `git clone iki.git myiki` to get a copy. Then I do + + cd myiki + echo "test" >> somepage.mdwm" + git add somepage.mdwm + git pull + git commit -m "test" + git push + +Then I get the following error message + + Counting objects: 5, done. + Delta compression using up to 2 threads. + Compressing objects: 100% (2/2), done. + Writing objects: 100% (3/3), 287 bytes, done. + Total 3 (delta 1), reused 0 (delta 0) + Unpacking objects: 100% (3/3), done. + remote: From /home/myuser/iki + remote: 32bb6be..1f3a647 master -> origin/master + remote: There are no candidates for merging among the refs that you just fetched. + remote: Generally this means that you provided a wildcard refspec which had no + remote: matches on the remote end. + remote: 'git pull --prune origin' failed: at /usr/share/perl5/IkiWiki/Plugin/git.pm line 207. + remote: skipping bad filename local.css~ + remote: skipping bad filename #tex_sandbox.mdwn# + To /home/myuser/iki.git + 32bb6be..1f3a647 master -> master + +When I check the repository via gitk I see that everything seems to be ok, if I check the scrdir the same way origin master is one step away from master and the change doesn't appear on the iki web page. Then I tried to do a `sudo git pull --prune origin master` in my scrdir which sets master to the head, but the change isn't there anyway. It foremost appears when I do a second change as above or if I do `sudo ikiwiki --setup iki.setup`. + +By the way the setup gives me a similar error message: + + successfully generated /var/www/iki/ikiwiki.cgi + successfully generated /home/myuser/iki.git/hooks/post-update + There are no candidates for merging among the refs that you just fetched. + Generally this means that you provided a wildcard refspec which had no + matches on the remote end. + 'git pull --prune origin' failed: at /usr/share/perl5/IkiWiki/Plugin/git.pm line 207. + +Any ideas what may be wrong here and how to fix this? diff --git a/doc/forum/Refresh_or_recreate_style.css__63__.mdwn b/doc/forum/Refresh_or_recreate_style.css__63__.mdwn new file mode 100644 index 000000000..262b0e3c6 --- /dev/null +++ b/doc/forum/Refresh_or_recreate_style.css__63__.mdwn @@ -0,0 +1,40 @@ +I was trying to use plain blueview theme but that's not what I see in the installed style.css: + + ~/src/ikiwiki/themes/blueview$ grep bzed style.css + /* bzed theme for ikiwiki + ~/src/ikiwiki/themes/blueview$ wc -l style.css + 281 style.css + $ grep bzed ~/www/style.css + /* bzed theme for ikiwiki + /* bzed theme for ikiwiki + /* bzed theme for ikiwiki + /* bzed theme for ikiwiki + /* bzed theme for ikiwiki + /* bzed theme for ikiwiki + /* bzed theme for ikiwiki + /* bzed theme for ikiwiki + /* bzed theme for ikiwiki + /* bzed theme for ikiwiki + $ wc -l ~/www/style.css + 7913 + +I have installed ikiwiki to my home directory on the shared server and it seems the big css file is there too: + + $ grep bzed ~/bin/share/ikiwiki/themes/blueview/style.css + /* bzed theme for ikiwiki + /* bzed theme for ikiwiki + /* bzed theme for ikiwiki + /* bzed theme for ikiwiki + /* bzed theme for ikiwiki + /* bzed theme for ikiwiki + /* bzed theme for ikiwiki + /* bzed theme for ikiwiki + /* bzed theme for ikiwiki + /* bzed theme for ikiwiki + $ wc -l ~/bin/share/ikiwiki/themes/blueview/style.css + 7913 + +Is the style.css really supposed to be that big? +If not, how to create it from scratch? + +Reason why I'm debugging the css is that I'd like to make it better on small handset screens, like drop all margins, inline or hide sidebar etc. Chromium shows that the processed css is quite a mess. diff --git a/doc/forum/Refresh_or_recreate_style.css__63__/comment_1_3274be931d0b543c7f7cf641810817aa._comment b/doc/forum/Refresh_or_recreate_style.css__63__/comment_1_3274be931d0b543c7f7cf641810817aa._comment new file mode 100644 index 000000000..608dca0ce --- /dev/null +++ b/doc/forum/Refresh_or_recreate_style.css__63__/comment_1_3274be931d0b543c7f7cf641810817aa._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="http://mcfrisk.myopenid.com/" + nickname="mikko.rapeli" + subject="bug/feature in Makefile.PL" + date="2013-03-30T11:53:41Z" + content=""" +Theme style.css files were appended when installing in Makefile.PL. IMO overwriting the destination files is more correct. Sent a patch to Joey. +"""]] diff --git a/doc/forum/Setting_http__95__proxy.mdwn b/doc/forum/Setting_http__95__proxy.mdwn new file mode 100644 index 000000000..3bf8a76bc --- /dev/null +++ b/doc/forum/Setting_http__95__proxy.mdwn @@ -0,0 +1,22 @@ +Hi! My wiki is behind a proxy and, as I understood looking in the web, I need to set the environment variables using ENV inside the wiki's config. + +So far I tried: + +ENV: { + http_proxy => 'http://proxy.uns.edu.ar:1280/', + https_proxy => 'http://proxy.uns.edu.ar:1280/' +} + +without luck, as I get: + + +YAML::XS::Load Error: The problem: + + found unexpected ':' + +was found at document: 1, line: 85, column: 22 +while scanning a plain scalar at line: 85, column: 3 +usage: ikiwiki [options] source dest + ikiwiki --setup configfile + +What am I missing? (maybe learning perl?) diff --git a/doc/forum/Setting_http__95__proxy/comment_1_350a7c4834c9f422e107b646cdbae3b0._comment b/doc/forum/Setting_http__95__proxy/comment_1_350a7c4834c9f422e107b646cdbae3b0._comment new file mode 100644 index 000000000..3623652ab --- /dev/null +++ b/doc/forum/Setting_http__95__proxy/comment_1_350a7c4834c9f422e107b646cdbae3b0._comment @@ -0,0 +1,20 @@ +[[!comment format=mdwn + username="http://smcv.pseudorandom.co.uk/" + nickname="smcv" + subject="comment 1" + date="2012-10-10T13:45:10Z" + content=""" +If your wiki configuration is written in YAML (it says IkiWiki::Setup::Yaml near the top), the correct syntax is something like + + ENV: + http_proxy: http://proxy.uns.edu.ar:1280/ + https_proxy: http://proxy.uns.edu.ar:1280/ + +or + + ENV: { http_proxy: 'http://proxy.uns.edu.ar:1280/', https_proxy: 'http://proxy.uns.edu.ar:1280/' } + +(many variations are possible, see ). + +The syntax you quoted is correct for Perl-syntax setup files (which will mention IkiWiki::Setup::Standard near the top), but not YAML ones. +"""]] diff --git a/doc/forum/Slow_ikiwiki_after_first_run.mdwn b/doc/forum/Slow_ikiwiki_after_first_run.mdwn new file mode 100644 index 000000000..db07f6dc3 --- /dev/null +++ b/doc/forum/Slow_ikiwiki_after_first_run.mdwn @@ -0,0 +1 @@ +I have local ikiwiki on my notebook. When I save an edit the first time after booting and logging in, saving is very slow. Any idea how to fix this? diff --git a/doc/forum/The_requested_URL___47____126__jean__47__blog__47__ikiwiki.cgi_was_not_found_on_this_server./comment_8_098bb7a3112751a7e6167483dde626bb._comment b/doc/forum/The_requested_URL___47____126__jean__47__blog__47__ikiwiki.cgi_was_not_found_on_this_server./comment_8_098bb7a3112751a7e6167483dde626bb._comment new file mode 100644 index 000000000..ff0d79dbd --- /dev/null +++ b/doc/forum/The_requested_URL___47____126__jean__47__blog__47__ikiwiki.cgi_was_not_found_on_this_server./comment_8_098bb7a3112751a7e6167483dde626bb._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="http://andrewspiers.pip.verisignlabs.com/" + ip="118.209.91.42" + subject="passing environment variables." + date="2012-08-24T03:47:07Z" + content=""" +I am getting this 'Error: \"do\" parameter missing' when trying to log in as well. I am using Apache and Firefox. The Apache error log says \"Died at /usr/share/perl5/IkiWiki/CGI.pm line 428.\" when it dies. + +I do have ssl set up, not sure if this is part of the problem? +"""]] diff --git a/doc/forum/The_requested_URL___47____126__jean__47__blog__47__ikiwiki.cgi_was_not_found_on_this_server./comment_9_fbf403255c38da93caa5b98589fbb285._comment b/doc/forum/The_requested_URL___47____126__jean__47__blog__47__ikiwiki.cgi_was_not_found_on_this_server./comment_9_fbf403255c38da93caa5b98589fbb285._comment new file mode 100644 index 000000000..53c44d14f --- /dev/null +++ b/doc/forum/The_requested_URL___47____126__jean__47__blog__47__ikiwiki.cgi_was_not_found_on_this_server./comment_9_fbf403255c38da93caa5b98589fbb285._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="http://andrewspiers.pip.verisignlabs.com/" + ip="118.209.91.42" + subject="comment 9" + date="2012-08-24T04:29:06Z" + content=""" +SSL was the problem, it was necessary to specify https:// in the url=> and cgiurl=> parameters in ikiwiki.setup, the redirect wasn't working otherwise. +"""]] diff --git a/doc/forum/Translating_ikiwiki_interface.mdwn b/doc/forum/Translating_ikiwiki_interface.mdwn new file mode 100644 index 000000000..4003302e5 --- /dev/null +++ b/doc/forum/Translating_ikiwiki_interface.mdwn @@ -0,0 +1,2 @@ +I am using ikiwiki for a spanish language wiki. I've read the [[translation]] page and [[plugins/po]] plugin page but it is not completely clear to me. As I understand it the po plugin is the recommended way to create translated versions of existing pages in your wiki based on a master language. But I actually don't need that as myself and other users already edit the wiki in spanish. What I would actually like is to have the ikiwiki interface itself translated into spanish. +Is it possible to have my wiki always appear in spanish? I can see that the debian package already includes po files for spanish. How do i activate the spanish translation permanently? Did I miss something obvious? diff --git a/doc/forum/What__39__s_the_difference_between_tag_and_taglink__63__.mdwn b/doc/forum/What__39__s_the_difference_between_tag_and_taglink__63__.mdwn new file mode 100644 index 000000000..4fee07db4 --- /dev/null +++ b/doc/forum/What__39__s_the_difference_between_tag_and_taglink__63__.mdwn @@ -0,0 +1,9 @@ +It occurred to me the difference between tag and taglink, as described in http://ikiwiki.info/ikiwiki/directive/tag/ is just that the latter enable the option to have a displayed form of the tag different from the tag itself, e.g. a tag `foo` can be displayed as `bar` using + + \[[!taglink foo|bar]] + +while with tag you can only display the tag `foo` as itself + + \[[!tag foo]] + +Is that it? diff --git a/doc/forum/What__39__s_the_difference_between_tag_and_taglink__63__/comment_1_b3553d65d12af4c4a87f1f66f961c8d9._comment b/doc/forum/What__39__s_the_difference_between_tag_and_taglink__63__/comment_1_b3553d65d12af4c4a87f1f66f961c8d9._comment new file mode 100644 index 000000000..239444516 --- /dev/null +++ b/doc/forum/What__39__s_the_difference_between_tag_and_taglink__63__/comment_1_b3553d65d12af4c4a87f1f66f961c8d9._comment @@ -0,0 +1,49 @@ +[[!comment format=mdwn + username="http://smcv.pseudorandom.co.uk/" + nickname="smcv" + subject="comment 1" + date="2012-08-19T15:05:35Z" + content=""" +`\[[!tag]]` does not produce any output in the body of the page, but +stores an invisible tag (which, in the default templates, gets displayed +in the footer of the page). + +For instance, this + + Here is some text about badgers + \[[!tag badger]] + +or this + + \[[!tag badger]] + Here is some text about badgers + +or even this + + Here is some text about \[[!tag badger]]badgers + +will all come out like this: + + Edit | RecentChanges | etc. + ---- + Here is some text about badgers + ---- + tags: badger + +`\[[!taglink]]` produces a [[ikiwiki/WikiLink]] in the body of the +page, *and* stores an invisible tag like `\[[!tag]]`. + +So this: + + Some text about \[[!tag mushrooms]] and toadstools + +renders like this + + Edit | RecentChanges | etc. + ---- + Some text about _mushrooms_ and toadstools + ---- + tags: mushrooms + +where `_mushrooms_` represents a hyperlink. +"""]] diff --git a/doc/forum/Xapian_search:_empty_postlist_table/comment_4_40479ac2cfbca609f5f423e539a20ee0._comment b/doc/forum/Xapian_search:_empty_postlist_table/comment_4_40479ac2cfbca609f5f423e539a20ee0._comment new file mode 100644 index 000000000..a120f976d --- /dev/null +++ b/doc/forum/Xapian_search:_empty_postlist_table/comment_4_40479ac2cfbca609f5f423e539a20ee0._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawlXywgEUJjKArnORJR-5hmNFv8bTraXO1Y" + nickname="Ramsey" + subject="The same issue is happening with me" + date="2013-03-06T13:10:15Z" + content=""" +I use ikiwiki version 3.20130212 and tried xapian versions 1.2.5, 1.2.8, 1.2.13. All to no avail. The postlist.DB file is empty for me. I think that is the crux of the problem. Does anybody know why this could be? +"""]] diff --git a/doc/forum/Xapian_search:_empty_postlist_table/comment_5_397443138da276e11c2e9b9fa7b51406._comment b/doc/forum/Xapian_search:_empty_postlist_table/comment_5_397443138da276e11c2e9b9fa7b51406._comment new file mode 100644 index 000000000..56dd7c61d --- /dev/null +++ b/doc/forum/Xapian_search:_empty_postlist_table/comment_5_397443138da276e11c2e9b9fa7b51406._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawljJoWAYhI55qm4hRLdzIOQBNMVB6fgrs8" + nickname="Ramsey" + subject="comment 5" + date="2013-03-06T22:42:54Z" + content=""" +Tried version xapian 1.2.3 and it did not work either. Can someone please help me debug this? +"""]] diff --git a/doc/forum/build_error:_Cannot_decode_string_with_wide_characters/comment_4_d5d0174e09a94359c23fd9c006a22bbc._comment b/doc/forum/build_error:_Cannot_decode_string_with_wide_characters/comment_4_d5d0174e09a94359c23fd9c006a22bbc._comment new file mode 100644 index 000000000..57c99bee9 --- /dev/null +++ b/doc/forum/build_error:_Cannot_decode_string_with_wide_characters/comment_4_d5d0174e09a94359c23fd9c006a22bbc._comment @@ -0,0 +1,50 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawmKyeW2G4jjSdnL1m6kPPtAiGFUBsnYCfY" + nickname="FName" + subject="Still can't use ikiwiki on Mac OS X" + date="2012-10-21T17:12:15Z" + content=""" +I'm still not able to use Ikiwiki on Mac: + + $ ikiwiki --setup ./web.setup + generating wrappers.. + rebuilding wiki.. + Cannot decode string with wide characters at /opt/local/lib/perl5/5.12.4/darwin-thread-multi-2level/Encode.pm line 174. + + + $ ls -la /opt/local/bin/perl* + lrwxr-xr-x 1 root admin 20 Oct 21 12:06 /opt/local/bin/perl -> /opt/local/bin/perl5 + lrwxr-xr-x 1 root admin 23 Oct 21 12:06 /opt/local/bin/perl5 -> /opt/local/bin/perl5.12 + -rwxr-xr-x 1 root admin 9896 Jun 26 01:39 /opt/local/bin/perl5.12 + lrwxr-xr-x 1 root admin 8 Jun 26 01:39 /opt/local/bin/perl5.12.4 -> perl5.12 + -rwxr-xr-x 1 root admin 10000 Jun 26 01:55 /opt/local/bin/perl5.14 + lrwxr-xr-x 1 root admin 8 Jun 26 01:56 /opt/local/bin/perl5.14.2 -> perl5.14 + -rwxr-xr-x 1 root admin 10000 Aug 23 13:41 /opt/local/bin/perl5.16 + lrwxr-xr-x 1 root admin 8 Aug 23 13:42 /opt/local/bin/perl5.16.1 -> perl5.16 + lrwxr-xr-x 1 root admin 12 Oct 21 11:44 /opt/local/bin/perlbug -> perlbug-5.16 + -rwxr-xr-x 2 root admin 45815 Jun 26 01:39 /opt/local/bin/perlbug-5.12 + -rwxr-xr-x 2 root admin 45203 Jun 26 01:55 /opt/local/bin/perlbug-5.14 + -rwxr-xr-x 2 root admin 41712 Aug 23 13:41 /opt/local/bin/perlbug-5.16 + lrwxr-xr-x 1 root admin 12 Oct 21 11:44 /opt/local/bin/perldoc -> perldoc-5.16 + -rwxr-xr-x 1 root admin 244 Jun 26 01:39 /opt/local/bin/perldoc-5.12 + -rwxr-xr-x 1 root admin 244 Jun 26 01:55 /opt/local/bin/perldoc-5.14 + -rwxr-xr-x 1 root admin 244 Aug 23 13:41 /opt/local/bin/perldoc-5.16 + lrwxr-xr-x 1 root admin 12 Oct 21 11:44 /opt/local/bin/perlivp -> perlivp-5.16 + -rwxr-xr-x 1 root admin 12484 Jun 26 01:39 /opt/local/bin/perlivp-5.12 + -rwxr-xr-x 1 root admin 12297 Jun 26 01:55 /opt/local/bin/perlivp-5.14 + -rwxr-xr-x 1 root admin 10802 Aug 23 13:41 /opt/local/bin/perlivp-5.16 + lrwxr-xr-x 1 root admin 15 Oct 21 11:44 /opt/local/bin/perlthanks -> perlthanks-5.16 + -rwxr-xr-x 2 root admin 45815 Jun 26 01:39 /opt/local/bin/perlthanks-5.12 + -rwxr-xr-x 2 root admin 45203 Jun 26 01:55 /opt/local/bin/perlthanks-5.14 + -rwxr-xr-x 2 root admin 41712 Aug 23 13:41 /opt/local/bin/perlthanks-5.16 + + +If I simply relink `/opt/local/bin/perl` to a newer version of perl such as `/opt/local/bin/perl5.16`, it still doesn't work, as it seems + + $ ikiwiki -version + ikiwiki version 3.20110608 + +simply force to use perl5.12. + + +"""]] diff --git a/doc/forum/build_error:_Cannot_decode_string_with_wide_characters/comment_5_e652027a8f90ebef6f21613b5784ded2._comment b/doc/forum/build_error:_Cannot_decode_string_with_wide_characters/comment_5_e652027a8f90ebef6f21613b5784ded2._comment new file mode 100644 index 000000000..08bde8c85 --- /dev/null +++ b/doc/forum/build_error:_Cannot_decode_string_with_wide_characters/comment_5_e652027a8f90ebef6f21613b5784ded2._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawnxp2XU8gIribhhGhGuYtU6eMMwHv5gUGI" + nickname="Amitai" + subject="may I recommend pkgsrc?" + date="2012-10-22T03:50:56Z" + content=""" +Looks like the MacPorts ikiwiki package is old. I use ikiwiki from pkgsrc as mentioned in [[tips/ikiwiki_on_mac_os_x]]. I also maintain the package, so it's updated regularly. +"""]] diff --git a/doc/forum/google_openid_broken__63__.mdwn b/doc/forum/google_openid_broken__63__.mdwn index 96ba2d791..d25d8fe4c 100644 --- a/doc/forum/google_openid_broken__63__.mdwn +++ b/doc/forum/google_openid_broken__63__.mdwn @@ -4,6 +4,9 @@ directly to sign into ikiwiki. Just use, for example, > This seems to work fine if you use the profile directly as an OpenID. It doesn't seem to work with delegation. From that I can see, this is a deliberate decision by Google for security reasons. See the response [here](http://groups.google.com/group/google-federated-login-api/browse_thread/thread/825067789537568c/23451a68c8b8b057?show_docid=23451a68c8b8b057). -- [[Will]] +### adding the GMail OpenID as an admin is unhandy +Adding the non-human-friendly OpenID from Gmail as an admin for ikiwiki (if you haven't set up a profile with a readabe URL) is unhandy; first, you need to discover the URL, for example, by making a web edit with it (like me [here](http://source.ikiwiki.branchable.com/?p=source.git;a=search;s=https://www.google.com/accounts/o8/id%3Fid%3DAItOawl3JW_Ow4xMqj98Ig1vwGx_AnjUSsgwE8E;st=author)), and then copy the URL to ikiwiki.setup. --Ivan Z. + ## historical discussion when I login via to this wiki (or ours) via Google's OpenID, I get this error: diff --git a/doc/forum/how_could_i_generate_a_flat_textfile_from_metadata_in_multiple_pages.mdwn b/doc/forum/how_could_i_generate_a_flat_textfile_from_metadata_in_multiple_pages.mdwn new file mode 100644 index 000000000..d82a419a3 --- /dev/null +++ b/doc/forum/how_could_i_generate_a_flat_textfile_from_metadata_in_multiple_pages.mdwn @@ -0,0 +1,3 @@ +I am already using the [[plugins/contrib/report]] plugin to generate reports aggregated from multiple pages, and it's great! However, I am now looking at generating non-HTML reports. Basically, I want to generate a BIND zonefile from the data aggregated from similar reports. I have gone as far as using the [[plugins/pagetemplate]] plugin to have an empty page as a template - but even that bit doesn't work as i still get pesky `