Edgewall Software

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#11113 closed defect (fixed)

AssertionError: Cannot rename non-existent page

Reported by: 506672917@… Owned by: Christian Boos
Priority: normal Milestone: 1.0.2
Component: wiki system Version: 0.12
Severity: normal Keywords:
Cc: Branch:
Release Notes:

Show simple error message rather than a backtrace when trying to delete or rename a non-existing page.

API Changes:


How to Reproduce

While doing a POST operation on /wiki/WikiStart, Trac issued an internal error.

i was renamed the WikiStart page to ProjectHome and put a redirecting link to the new page. when i browse my trac the index page still show me WikiStart,I have to click the redirecting link to my ProjectHome. So I decide delete the WikiStart page,but it is still there.then i try to rename it again, and then it happens.

Request parameters:

{'__FORM_TOKEN': u'356d7841fc0d87d60a16535f',
 'action': u'rename',
 'new_name': u'ProjectHome',
 'page': u'WikiStart',
 'submit': u'\u91cd\u547d\u540d\u9875\u9762'}

User agent: Mozilla/5.0 (Windows NT 5.1; rv:19.0) Gecko/20100101 Firefox/19.0

System Information

Trac 0.12
Babel 0.9.5
Genshi 0.6
pysqlite 2.6.0
Python 2.7.3 (default, Mar 14 2013, 15:39:00)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)]
setuptools 0.6
SQLite 3.3.6
jQuery 1.4.2

Enabled Plugins

AutocompleteUsers 0.4.2dev
BreadCrumbsNav 0.2
TicketExtPlugin 0.3.2
Tracchildtickets 2.5.2
TracCustomFieldAdmin 0.2.8
TracDateField 2.0.0dev

Python Traceback

Traceback (most recent call last):
  File "build/bdist.linux-i686/egg/trac/web/main.py", line 513, in _dispatch_request
  File "build/bdist.linux-i686/egg/trac/web/main.py", line 235, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-i686/egg/trac/wiki/web_ui.py", line 149, in process_request
    return self._do_rename(req, page)
  File "build/bdist.linux-i686/egg/trac/wiki/web_ui.py", line 304, in _do_rename
  File "build/bdist.linux-i686/egg/trac/db/api.py", line 77, in transaction_wrapper
  File "build/bdist.linux-i686/egg/trac/wiki/web_ui.py", line 306, in do_rename
  File "build/bdist.linux-i686/egg/trac/wiki/model.py", line 165, in rename
    assert self.exists, 'Cannot rename non-existent page'
AssertionError: Cannot rename non-existent page

Attachments (0)

Change History (5)

in reply to:  description comment:1 by anonymous, 6 years ago

perhaps the WikiStart page was cached by my proxy server so i got the WikiStart Page so i can delete or rename an non-existent page. maybe it is a false bug.

comment:2 by Christian Boos, 6 years ago

Milestone: 1.0.2
Release Notes: modified (diff)

Or you had that page still present in another tab or another browser, yes.

The internal error is not so nice, we could at least raise a TracError for this, as this is quite easy to trigger.

Done so in r11795.

comment:3 by Christian Boos, 6 years ago

Owner: set to Christian Boos
Status: newassigned

comment:4 by Christian Boos, 6 years ago

Resolution: fixed
Status: assignedclosed

comment:5 by Ryan J Ollos, 6 years ago

[11795] merged to trunk in [12408]

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

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