Modify ↓
#3000 closed defect (fixed)
Search fails when the Wiki _and_ Doxygen has results for a keyword
| Reported by: | Owned by: | Christian Boos | |
|---|---|---|---|
| Priority: | normal | Component: | DoxygenPlugin |
| Severity: | normal | Keywords: | doxygen search datetime |
| Cc: | Trac Release: | 0.11 |
Description
The problem is a "datetime.datetime <-> int comparision error" because:
- The default date-format of the ISearchSource is datetime
- DoxygenPlugin returns the filedate (ctime) as int.
- Trac compares both time-types to sort them, but fails because type datetime can not be compared with type int.
Here are the patch instructions for doxygentrac.py using the trac function to_datetime:
...
from trac.util.datefmt import to_timestamp, to_datetime, utc
...
def get_search_results(self, req, keywords, filters):
...
if os.path.isdir(path):
index = os.path.join(path, 'search.idx')
if os.path.exists(index):
>>>> creation = to_datetime(os.path.getctime(index)) <<<<
for result in self._search_in_documentation(doc, keywords):
result['url'] = req.href.doxygen(doc) + '/' \
...
if os.path.exists(index):
>>>> creation = to_datetime(os.path.getctime(index)) <<<<
for result in self._search_in_documentation('', keywords):
Attachments (0)
Change History (3)
comment:1 Changed 17 years ago by
| Owner: | changed from Radek Bartoň to Christian Boos |
|---|
comment:2 Changed 17 years ago by
This fix doesn't work for me. doxygentrac-typeerror-comparison-datetime-float-fix.2.patch from #3079 works however (is a combination of my own first attempt at fixing and this one).
comment:3 Changed 13 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
This was fixed in [5596].
Note: See
TracTickets for help on using
tickets.



Yes, it's relict form 0.10 branch since none is really maintaining this plugin.