]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/lockedit_plugin_should_alert_user_about_an_invalid_pagespec_in_preferences.mdwn
(no commit message)
[ikiwiki.git] / doc / bugs / lockedit_plugin_should_alert_user_about_an_invalid_pagespec_in_preferences.mdwn
1 [[plugins/lockedit]] adds the form fields for a [[pagespec]] to preferences. This pagespec should be supplied "raw"; i.e., without quotes around it. Inexperienced users (such as [[myself|users/jon]]) may provide an invalid pagespec, such as one with quotes on it. This will be merrily accepted by the form, but will cause no locking to take place.
2
3 Perhaps some validation should be performed on the pagespec and the form-submission return include "warning: this pagespec is invalid" or "warning: this pagespec does not match any existing pages" or similar.
4
5 > The pagespec is no longer in the preferences and instead in the setup
6 > file now. That makes warning about a problem with it harder.
7
8 > Ikiwiki could try to detect this problem and warn at setup time to
9 > stderr, I guess.
10
11 > Main problem is I see little way to actually detect the problem you
12 > described. A pagespec with quotes around it is valid. For example, the
13 > pagespec `"foo or bar"` matches a page named `"foo` or a page named `bar"`.
14 >
15 > There are small classes of invalid pagespecs. For example, `(foo or bar`
16 > is invalid due to having unbalanced parens, while `foo or and bar` 
17 > has invalid syntax. It's possible to detect these, I guess ... --[[Joey]]
18
19 >> Having moved it to the .setup file makes things more obvious I think.
20 >> Anyway I consider this [[done]], please de-done this if you disagree.
21 >> --[[Jon]]