aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/__96__wiki__95__file__95__chars__96___setting_not_propagated_to_CGI_wrapper.mdwn
blob: f04b3404befa2c2da3892c1d6ae9873a9ab3d6bf (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
I've set `wiki_file_chars` to a non-standard value in the setup file:

    wiki_file_chars => "-[:alnum:]+/.:_\x{1f310}\x{1f430}",

(In case you're wondering, [this is the page](http://xn--9dbdkw.se/🌐/).)

ikiwiki recognises my pages when I run it from the command line, but
when I edit something through the CGI "script", ikiwiki would suddenly
not recognise them.

By running `strings` on the CGI wrapper I found that the option
`wiki_file_regexp` was still at its original setting.  So as a workaround,
I added this to the setup file and everything worked:

    wiki_file_regexp => qr/(^[-[:alnum:]+\/.:_\x{1f310}\x{1f430}]+$)/,

Maybe the CGI wrapper should specially call `checkconfig`, which is
the function responsible for updating `wiki_file_regexp`?

--[[legoscia]]

> You have to regrenerate the cgi wrapper after changing your setup file
> for the configuration changes to take effect.
> 
> I tested it, setting `wiki_file_chars => "moocow"`,
> running ikiwiki -refresh -wrappers my.setup, and looking at strings:
> `'wiki_file_regexp' => qr/(?-xism:(^[moocow]+$))/`
> So, this appears to have been user error. [[done]] --[[Joey]]