aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/undefined_value_as_a_HASH_reference.mdwn
blob: 228c3baac2659c7a8b4c5e9991c3d1046409c699 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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]]