Advanced Title Search on "storylen" errors out with a Python error:
Unknown field: storylen
--> -->
<type 'exceptions.UnboundLocalError'> Python 2.5: /usr/bin/python
Sun Aug 30 18:08:52 2009
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/var/www/cgi-bin/edit/tp_search.cgi in ()
117 entry = string.replace(entry, '*', '%')
118 use = escape_quotes(form['USE_1'].value)
119 (term1, dbases1, followup) = MakeSQLterm(use, entry)
120 terms = term1
121 dbases = dbases1
term1 undefined, dbases1 undefined, followup undefined, MakeSQLterm = <function MakeSQLterm at 0xb781eaac>, use = 'storylen', entry = 'ss'
/var/www/cgi-bin/edit/tp_search.cgi in MakeSQLterm(field='storylen', value='ss')
94 else:
95 print "<H2>Unknown field: %s</H2>" % field
96 return (clause, dbases, followup)
97
98 if __name__ == '__main__':
clause undefined, dbases undefined, followup undefined
<type 'exceptions.UnboundLocalError'>: local variable 'clause' referenced before assignment
Anonymous
Fixed by the commits of 8-Sep-2009 to edit/ta_search.py 1.8 and tp_search.py 1.9. makeSQLTerm was not handling "storylen" at all. Added that support, using "LIKE" instead of "=" to be case-insensitive and to allow for searching for oddball things.
Implemented in patch 2009-21.