Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#3187 closed defect (fixed)

SpamFilter: first setup causes error

Reported by: asmodai@… Owned by: Alec Thomas
Priority: normal Milestone: 0.10
Component: general Version: devel
Severity: minor Keywords: spamfilter
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I installed the SpamFilter egg in the plugins directory and subsequently proceded to create a BadContent page.

When I submitted I got greeted by a:

Traceback (most recent call last):
  File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 300, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 190, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/lib/python2.4/site-packages/trac/wiki/web_ui.py", line 107, in process_request
    self._do_save(req, db, page)
  File "/usr/local/lib/python2.4/site-packages/trac/wiki/web_ui.py", line 211, in _do_save
    req.remote_addr)
  File "/usr/local/lib/python2.4/site-packages/trac/wiki/model.py", line 134, in save
    for listener in WikiSystem(self.env).change_listeners:
  File "/usr/local/lib/python2.4/site-packages/trac/core.py", line 55, in extensions
    return filter(None, [component.compmgr[cls] for cls in extensions])
  File "/usr/local/lib/python2.4/site-packages/trac/core.py", line 186, in __getitem__
    component = cls(self)
  File "/usr/local/lib/python2.4/site-packages/trac/core.py", line 95, in maybe_init
    init(self)
  File "build/bdist.freebsd-4.11-STABLE-i386/egg/tracspamfilter/filters/regex.py", line 33, in __init__
  File "build/bdist.freebsd-4.11-STABLE-i386/egg/tracspamfilter/filters/regex.py", line 57, in _load_patterns
IndexError: list index out of range

Possibly because BadContent is effectively empty at that point until the page gets committed as revision 1.

Attachments (0)

Change History (5)

comment:1 by Christian Boos, 18 years ago

Owner: changed from Jonas Borgström to Christian Boos
Severity: normalminor
Status: newassigned

I could reproduce it: this is happening when the first version of the BadContent page didn't contain a {{{...}}} block.

comment:2 by Christian Boos, 18 years ago

Status: assignednew

hm, well, I fixed that error, but then for some reason, the filter doesn't seem to work. As I've no time left to finish investigating this, someone else is welcome to try to fix the regex filter.

Note: I'll be back on Monday

comment:3 by Christian Boos, 18 years ago

Milestone: 0.10

Need to resume work on this…

comment:4 by Christian Boos, 18 years ago

Owner: changed from Christian Boos to Alec Thomas

comment:5 by Christian Boos, 18 years ago

Resolution: fixed
Status: newclosed

alec fixed that in r3402.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Alec Thomas.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Alec Thomas to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.