]> sipb.mit.edu Git - ikiwiki.git/blob - doc/forum/Exception:_Unknown_function___96__this__39___.mdwn
(no commit message)
[ikiwiki.git] / doc / forum / Exception:_Unknown_function___96__this__39___.mdwn
1 I'm very excited to try out ikiwiki, since it should fit my purposes extremely well, but I'm having trouble with the search plugin. I'm pretty sure that right after I installed ikiwiki and needed dependencies, the search plugin was working fine. However, now when I try to use search, I get "Exception: Unknown function `this'" error on a blank page. I'm not sure how I should go about debugging this issue - my server's (I use Lighttpd 1.4.22) error log has no mention of the exception and there's nothing in /var/log/syslog either.
2
3 What might be causing this exception and how I might go about debugging exceptions?
4
5 > Appears to be coming from your xapian omega cgi binary. If you
6 > run `strings /usr/lib/cgi-bin/omega/omega` you can see it has
7 > "Exception: " in it, and I have found some similar (but not identical)
8 > error messages from xapian in a web search.
9
10 > I donĀ“t know what to suggest, other than upgrade/downgrade/reinstall
11 > xapian-omega, and contacting the xapian developers for debugging.
12 > You could try rebuilding your wiki in case it is somehow
13 > caused by a problem with the xapian database. Failing everything, you
14 > could switch to [[google_search_plugin|plugins/google]]. --[[Joey]] 
15
16 >> Thanks, Joey. With your help I was able to figure out what was wrong. It's a fun little bug (or feature): the title of my wiki had string `$this` in title and that's what was causing the omega binary to choke. My wiki's title was inserted without escaping into the query template used by omega. Omega treated `$this` in the title as a function name and threw an exception because no such function was defined. To avoid this behavior, I used an html entity in the title, so `$this` became `$this`. I don't think that the wiki title should be inserted into the template without escaping - it can produce an error that's not trivial to debug. If users want to modify the html in the title, they should be editing respective templates, not typing html in the wiki title input. What do you think? --[[dkobozev]]