aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs
diff options
context:
space:
mode:
Diffstat (limited to 'doc/bugs')
-rw-r--r--doc/bugs/map_generates_malformed_HTML.mdwn7
-rw-r--r--doc/bugs/search_plugin_finds_no_results_with_xapian_1.2.7.mdwn4
-rw-r--r--doc/bugs/template_creation_error.mdwn75
-rw-r--r--doc/bugs/undefined_value_as_a_HASH_reference.mdwn68
4 files changed, 152 insertions, 2 deletions
diff --git a/doc/bugs/map_generates_malformed_HTML.mdwn b/doc/bugs/map_generates_malformed_HTML.mdwn
index d47d066a8..890a6ef7f 100644
--- a/doc/bugs/map_generates_malformed_HTML.mdwn
+++ b/doc/bugs/map_generates_malformed_HTML.mdwn
@@ -1,4 +1,5 @@
[[!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
@@ -21,8 +22,8 @@ In particular, on a site with these pages:
* 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.
+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.
@@ -31,3 +32,5 @@ HTML with redundant `</ul><ul>` 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/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/template_creation_error.mdwn b/doc/bugs/template_creation_error.mdwn
index abf50cdc0..79dccc136 100644
--- a/doc/bugs/template_creation_error.mdwn
+++ b/doc/bugs/template_creation_error.mdwn
@@ -34,3 +34,78 @@ To ssh://b-odelama-com@odelama-com.branchable.com/
</pre>
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 `<TMPL_VAR>` 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:
+>
+> <TMPL_IF FALSE>
+> <!-- This part only appears when being used as a page.
+> It assumes that you never set FALSE to a true value :-) -->
+> \[[!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
+> </TMPL_IF>
+>
+> The thing is called <TMPL_VAR name> and its size is <TMPL_VAR size>
+>
+> I suppose you could maybe extend that to something like this:
+>
+> <TMPL_IF FALSE>
+> <!-- This part only appears when being used as a page.
+> It assumes that you never set FALSE to a true value :-) -->
+> \[[!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
+> </TMPL_IF>
+>
+> <TMPL_IF FALSE>
+> \[[!if test="included() and !included()" then="""
+> </TMPL_IF>
+> <!-- This part only appears when being used as a template. It also
+> assumes that you never set FALSE to a true value, and it
+> relies on the [[ikiwiki/pagespec]] "included() and !included()"
+> never being true. -->
+> The thing is called <TMPL_VAR name> and its size is <TMPL_VAR size>
+> <TMPL_IF FALSE>
+> """]]
+> </TMPL_IF>
+>
+> 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 <TMPL_VAR name> and its size is <TMPL_VAR size>
+> """]]
+>
+> 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/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, <GEN4> line 97.
+ Reference found where even-sized list expected at /usr/share/perl5/IkiWiki/Setup.pm line 224, <GEN4> line 97.
+ Use of uninitialized value $section in hash element at /usr/share/perl5/IkiWiki/Setup.pm line 226, <GEN4> line 97.
+ Use of uninitialized value $section in hash element at /usr/share/perl5/IkiWiki/Setup.pm line 227, <GEN4> line 97.
+ Use of uninitialized value $section in concatenation (.) or string at /usr/share/perl5/IkiWiki/Setup.pm line 233, <GEN4> 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, <GEN4> 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.
+
+<pre>
+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} }'
+</pre>
+
+> 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]]