add spec dependency
[ikiwiki] / doc / bugs / must_save_before_uploading_more_than_one_attachment.mdwn
1 When I create a new page and upload an attachment all is fine.
2
3 If I try to upload a second attachment (or remove the previously uploaded attachment), no upload happens. Instead the page gets created. No matter what I typed in, I just get a map to show the attachment. Now I can edit this page and everything is fine again.
4
5 Another workaround is to first save the text and then edit and upload the rest.
6
7 Is this a problem on my site or does anyone else see this?
8
9 (If it's my fault feel free to move this to [[forum]].)
10
11 > I don't see a behavior like that. 
12 > I don't know what you mean when you say "I just get a map to show the
13 > attachment" A map?
14
15 > What version of ikiwiki? What browser? Is javascript enabled? --[[Joey]] 
16
17 >> I mean the [[ikiwiki/directive/map]] directive.
18 >> It was ikiwiki 3.20110430.
19 >> Tried Firefox and uzbl (webkit) with or without javascript.
20 >>
21 >> Just updated to 3.20110905. Now the problem has changed. Instead of saving the page with the second upload and leading me to it, it leaves me in the editform but creates the page anyway.
22 >> When saving I get informed, that someone else created the page. Obviously it was ikiwiki itself with the mentioned map:
23 >> \[[!map pages="path/to/page/* and ! ...
24 >>
25 >> This told me that [[plugins/autoindex]] is the bad guy. Deactivating this plugin helps out. Don't know if this is worth fixing... I can live without that plugin. --bacuh
26
27 >>> The right fix would probably be for `do=create` to allow replacing a page
28 >>> in the transient underlay without complaining (like the behaviour that
29 >>> `do=edit` normally has).
30
31 >>>> ... which it turns out it already does. --[[smcv]]
32
33 >>> That wouldn't help you unless [[plugins/autoindex]]
34 >>> defaulted to making transient pages (`autoindex_commit => 0`), but if we
35 >>> can fix [[removal_of_transient_pages]] then maybe that default can change?
36 >>> --[[smcv]]
37
38 >>>> It turns out that with `autoindex_commit => 0`, the failure mode is
39 >>>> different. The transient map is created when you attach the
40 >>>> attachment. When you save the page, it's written into the srcdir,
41 >>>> the map is deleted from the transientdir, and the ctime/mtime
42 >>>> in the indexdb are those of the file in the srcdir, but for some
43 >>>> reason the HTML output isn't re-generated (despite a refresh
44 >>>> happening). --[[smcv]]