aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/Problem_with_editing_page_after_first_SVN_commit.mdwn
blob: 3b630c537725e5222e24f53aaec4d28d48105e56 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
I have a strange problem with editing any page after its first SVN commit.
I'm not sure whether it's my ikiwiki backport bug or my misunderstanding
how ikiwiki works.

Assume that I have Foo page with any content and I want to put there link
to Bar page and next create the page. I do following steps:

1. Click Edit link on Foo page

2. Put the link to Bar page there and commit it by clicking "Save Page"
  button

  The Bar page is rendered correctly and now I can see ?Bar link. The URL
  in the address bar of my browser is

  http://my.host.com/wiki/foo.html?updated

3. Click ?Bar link

  Now I can see textarea for editing of page. It's empty, of course.

  The page doesn't exists in my SVN repo yet and my Apache server knows
  noting about it:

        $ find /my/ikiwiki/src/dir/ -type f -name bar.mdwn
        $ find /my/ikiwiki/dst/dir/ -type f -name bar.html

4. Add some initial content and click "Save Page" button
  to commit changes

  The Foo page also is rendered correctly and now I can see what I wrote.
  The URL in the address bar of my browser is

  http://my.host.com/wiki/bar.html?updated

  The page was added to the SVN repo and my Apache is able to serve it now:

        $ find /my/ikiwiki/src/dir/ -type f -name bar.mdwn
        /my/ikiwiki/src/dir/bar.mdwn
        $ find /my/ikiwiki/dst/dir/ -type f -name bar.html
        /my/ikiwiki/dst/dir/bar.html

5. Change the content of Bar page by clicking Edit link

  I can't do it, because the textarea is empty again. I have to run
  `ikiwiki --setup ikiwiki.setup` command by hand to rebuild the page.
  Then I can edit it.

Where is my mistake?

--Pawel

> It's not clear which Edit link you clicked in step 5. Is it the link on
> the new page, or the old link back on page Foo that you clicked on before
> to create Bar? It would also be good to see the URL you're at in step 5.
> --[[Joey]]

>> It was Edit link on new Bar page, of course. The URL in step 5 was
>> http://my.host.com/wiki/ikiwiki.cgi?page=bar&do=edit.

>> I've forget to add in my previous post that $pagesources{$page}
>> (cgi_editpage subroutine of /usr/share/perl5/IkiWiki/CGI.pm file)
>> doesn't exist in step 5. It exists after rebuilding all ikiwiki
>> pages by hand.

>> BTW, where does ikiwiki store information about rendered pages?
>> Is it `/my/ikiwiki/src/dir/.ikiwiki/` directory?

>> --Pawel

>>> Well, the missing %pagesources value explains the symptom for sure.
>>> ikiwiki stores its state in .ikiwiki/index, and that should include
>>> info about the new page you've created, including the source file for
>>> it, which is where the data in %pagesources comes from.
>>>
>>> It sounds to me like somehow, when you commit a change to svn by
>>> saving the page, it rebuilds the wiki, but does not update the index
>>> file. Maybe it's crashing before it can save the index file. Or maybe
>>> it's possibly be misconfigured, and updating a different index file in
>>> a different copy of the source? You should be able to figure out what's
>>> going on my looking at how the index file changes (or not) when you
>>> create the new page. --[[Joey]]