Advanced Title Search errors out when Term2 is specified, but Term1 is omitted:
<type 'exceptions.NameError'> Python 2.5: /usr/bin/python
Sun Aug 30 18:09:46 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 ()
128 need_right_paren = 1
129 else:
130 terms += " " +op1+ " "
131 # Escape spaces since 'AND NOT' is possible
132 followups = followups + "+op%3D" + escape_spaces(op1)
terms undefined, op1 = 'AND'
<type 'exceptions.NameError'>: name 'terms' is not defined
Anonymous
Fixed by the commits of 8-Sep-2009 for edit/ap_search.py 1.9, pp_search 1.8, and tp_search 1.8. All three types of advanced search had this same problem. Modified each set of code to check for omission of prior term(s) and to handle the various constructions appropriately, rather than assuming any prior terms are present.
Implemented in patch r2009-21.