1 I have a strange problem with editing any page after its first SVN commit.
2 I'm not sure whether it's my ikiwiki backport bug or my misunderstanding
5 Assume that I have Foo page with any content and I want to put there link
6 to Bar page and next create the page. I do following steps:
8 1. Click Edit link on Foo page
10 2. Put the link to Bar page there and commit it by clicking "Save Page"
13 The Bar page is rendered correctly and now I can see ?Bar link. The URL
14 in the address bar of my browser is
16 http://my.host.com/wiki/foo.html?updated
20 Now I can see textarea for editing of page. It's empty, of course.
22 The page doesn't exists in my SVN repo yet and my Apache server knows
25 $ find /my/ikiwiki/src/dir/ -type f -name bar.mdwn
26 $ find /my/ikiwiki/dst/dir/ -type f -name bar.html
28 4. Add some initial content and click "Save Page" button
31 The Foo page also is rendered correctly and now I can see what I wrote.
32 The URL in the address bar of my browser is
34 http://my.host.com/wiki/bar.html?updated
36 The page was added to the SVN repo and my Apache is able to serve it now:
38 $ find /my/ikiwiki/src/dir/ -type f -name bar.mdwn
39 /my/ikiwiki/src/dir/bar.mdwn
40 $ find /my/ikiwiki/dst/dir/ -type f -name bar.html
41 /my/ikiwiki/dst/dir/bar.html
43 5. Change the content of Bar page by clicking Edit link
45 I can't do it, because the textarea is empty again. I have to run
46 `ikiwiki --setup ikiwiki.setup` command by hand to rebuild the page.
53 > It's not clear which Edit link you clicked in step 5. Is it the link on
54 > the new page, or the old link back on page Foo that you clicked on before
55 > to create Bar? It would also be good to see the URL you're at in step 5.
58 >> It was Edit link on new Bar page, of course. The URL in step 5 was
59 >> http://my.host.com/wiki/ikiwiki.cgi?page=bar&do=edit.
61 >> I've forget to add in my previous post that $pagesources{$page}
62 >> (cgi_editpage subroutine of /usr/share/perl5/IkiWiki/CGI.pm file)
63 >> doesn't exist in step 5. It exists after rebuilding all ikiwiki
66 >> BTW, where does ikiwiki store information about rendered pages?
67 >> Is it `/my/ikiwiki/src/dir/.ikiwiki/` directory?
71 >>> Well, the missing %pagesources value explains the symptom for sure.
72 >>> ikiwiki stores its state in .ikiwiki/index, and that should include
73 >>> info about the new page you've created, including the source file for
74 >>> it, which is where the data in %pagesources comes from.
76 >>> It sounds to me like somehow, when you commit a change to svn by
77 >>> saving the page, it rebuilds the wiki, but does not update the index
78 >>> file. Maybe it's crashing before it can save the index file. Or maybe
79 >>> it's possibly be misconfigured, and updating a different index file in
80 >>> a different copy of the source? You should be able to figure out what's
81 >>> going on my looking at how the index file changes (or not) when you
82 >>> create the new page. --[[Joey]]
84 >>>> I've checked that my ikiwiki really doesn't touch `.ikiwiki/index` file
85 >>>> when I create and save a new page. In `error.log` file of my Apache2
86 >>>> server I can't see any "Permission denied" messages, but I suspect
87 >>>> that a reason of my problem can be the bad access permissions:
89 >>>> root@my.host:/my/ikiwiki/src/dir# ls -ld .ikiwiki/
90 >>>> drwxrwsr-x 2 www-data src 4096 2007-01-11 10:00 .ikiwiki/
91 >>>> root@my.host:/my/ikiwiki/src/dir# cd .ikiwiki/
92 >>>> root@my.host:/my/ikiwiki/src/dir/.ikiwiki# ls -l
94 >>>> -rw-rw-r-- 1 www-data src 17353 2007-01-11 10:00 index
95 >>>> -rw-rw-r-- 1 www-data src 0 2007-01-11 10:17 lockfile
96 >>>> -rw------- 1 www-data src 24576 2007-01-11 10:17 sessions.db
97 >>>> -rw------- 1 www-data src 0 2006-11-15 14:45 sessions.db.lck
98 >>>> -rw------- 1 www-data src 404 2007-01-08 10:24 userdb
100 >>>> What do you think about it? Does it look good? My ikiwiki runs
101 >>>> under control of Apache2 server and it's configured to run
102 >>>> as `www-data` user and `www-data` group. --Pawel