Opened 13 years ago

Closed 13 years ago

#6905 closed defect (fixed)

AttributeError: 'NoneType' object has no attribute 'navpath'

Reported by: anonymous Owned by: Alexey Kinyov
Priority: normal Component: FlexibleWikiPlugin
Severity: normal Keywords:
Cc: spudboy@… Trac Release: 0.11


trac-0.11.6-1.fc12 flexiblewikiplugin rev 5589

get this after enabling plugin and restarting apache:

Traceback (most recent call last):

File "/usr/lib/python2.6/site-packages/trac/web/", line 377, in send_error


File "/usr/lib/python2.6/site-packages/trac/web/", line 739, in render_template

data = self.populate_data(req, data)

File "/usr/lib/python2.6/site-packages/trac/web/", line 639, in populate_data


File "/usr/lib/python2.6/site-packages/trac/web/", line 195, in getattr

value = self.callbacks[name](self)

File "/usr/lib/python2.6/site-packages/trac/web/", line 494, in prepare_request

for category, name, text in contributor.get_navigation_items(req):

File "build/bdist.linux-x86_64/egg/tracflexwiki/", line 41, in get_navigation_items

href=req.href.flexwiki(action='new', page=req.args.get('node').navpath)))

AttributeError: 'NoneType' object has no attribute 'navpath'

Attachments (1) (1.5 KB) - added by Adam Bellaire 13 years ago.
patch for

Download all attachments as: .zip

Change History (4)

comment:1 Changed 13 years ago by Alexey Kinyov

I've tried to fix it for current stable release of Trac, but that seems not obvious. I didn't find the way of storing data per-request basis. So, the project is unmaintained at the moment and will stay so for unpredictable period.

comment:2 Changed 13 years ago by Adam Bellaire

It looks like there are multiple requests being dispatched (???). I added some tracing information to the debugging log, and in the first and third cases the plugin behaved as expected, but during the second request processing, get_navigation_items is invoked without pre_process_request being called first, so the node never gets populated at that step.

I have no idea why this is happening or what changes in Trac core caused it. However, I have written a small patch for which should fix the problem by simply abstracting the check for node data into a subroutine. We then check whether the node data has been fetched yet at both places (in pre_process_request and in get_navigation_items), and if it is not present, obtain it.

This seems to fix the problem.

Changed 13 years ago by Adam Bellaire

Attachment: added

patch for

comment:3 in reply to:  2 Changed 13 years ago by Alexey Kinyov

Resolution: fixed
Status: newclosed

Replying to bellaire:

This seems to fix the problem.

Hi, bellaire! Thank you for providing patch. I've applied with minor modifications and tested locally on 0.11.7 version. It seems to work for now.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Alexey Kinyov.
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.