Modify ↓
Opened 13 years ago
Closed 13 years ago
#9150 closed defect (fixed)
AttributeError happens with deleting a wiki page or a version of wiki page
Reported by: | Jun Omae | Owned by: | yosiyuki |
---|---|---|---|
Priority: | normal | Component: | WikiCreateTicketPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description
Traceback (most recent call last): File "build\bdist.win32\egg\trac\web\main.py", line 511, in _dispatch_request dispatcher.dispatch(req) File "build\bdist.win32\egg\trac\web\main.py", line 237, in dispatch resp = chosen_handler.process_request(req) File "build\bdist.win32\egg\trac\wiki\web_ui.py", line 148, in process_request self._do_delete(req, versioned_page) File "build\bdist.win32\egg\trac\wiki\web_ui.py", line 255, in _do_delete @self.env.with_transaction() File "build\bdist.win32\egg\trac\db\api.py", line 77, in transaction_wrapper fn(ldb) File "build\bdist.win32\egg\trac\wiki\web_ui.py", line 263, in do_delete page.delete(version, db) File "build\bdist.win32\egg\trac\wiki\model.py", line 114, in delete listener.wiki_page_deleted(self) AttributeError: 'WikiCreateTicket' object has no attribute 'wiki_page_deleted'
I think WikiCreateTicket
module should have the following methods.
-
wikicreateticket/__init__.py
20 20 def wiki_page_changed(self, page, version, t, comment, author, ipnr): 21 21 self.__parse_wiki_and_create_ticket(page, version) 22 22 23 def wiki_page_deleted(self, page): 24 pass 25 26 def wiki_page_version_deleted(self, page): 27 pass 28 29 def wiki_page_renamed(self, page, old_name): 30 pass 31 23 32 def __parse_wiki_and_create_ticket(self, page, version): 24 33 page = WikiPage(self.env, page.name, version) 25 34
Attachments (0)
Note: See
TracTickets for help on using
tickets.
(In [10641]) Adds
wiki_page_deleted
,wiki_page_version_deleted
andwiki_page_renamed
.AttributeError
happens when deleting a wiki page without these methods (fixed #9150).