#10461 closed defect (fixed)
"TypeError: 'NoneType' object is not iterable" with Trac 1.0
| Reported by: | damato | Owned by: | rjollos |
|---|---|---|---|
| Priority: | normal | Component: | DiscussionPlugin |
| Severity: | blocker | Keywords: | |
| Cc: | Trac Release: | 1.0 |
Description
After upgrading to Trac 1.0 I also upgraded my TracDisussion installation to the latest sources from the SVN (r12139). However, as soon as I started using it trac now always returns the following error message in the logs:
2012-10-10 09:18:46,130 Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/trac/web/main.py", line 497, in _dispatch_request
dispatcher.dispatch(req)
File "/usr/lib64/python2.7/site-packages/trac/web/main.py", line 214, in dispatch
resp = chosen_handler.process_request(req)
File "build/bdist.linux-x86_64/egg/tracdiscussion/core.py", line 112, in process_request
template, data = api.process_discussion(context)
File "build/bdist.linux-x86_64/egg/tracdiscussion/api.py", line 260, in process_discussion
self._do_actions(context, actions)
File "build/bdist.linux-x86_64/egg/tracdiscussion/api.py", line 705, in _do_actions
context.data['forums'] = self.get_forums(context, order, desc)
File "build/bdist.linux-x86_64/egg/tracdiscussion/api.py", line 1847, in get_forums
'discussion', 'forum/%s' % (forum['id'])))
File "build/bdist.linux-x86_64/egg/tractags/api.py", line 236, in get_tags
.get_resource_tags(req, resource))
TypeError: 'NoneType' object is not iterable
After reverting to revision r9787 TracDiscussion started working again.
Attachments (0)
Change History (9)
comment:1 Changed 8 months ago by rjollos
- Owner changed from Blackhex to rjollos
- Status changed from new to assigned
comment:2 follow-ups: ↓ 3 ↓ 9 Changed 8 months ago by damato
After checking, I had indeed disabled it. However:
- it should not throw an error like this if the TagsPlugin is disabled but better hide all the tags features
- I also had the permissions for the tags plugin set to disabled for anonymous use and thus the discussion forum also throwed the error for anonymous users.
Now I have enabled the tags plugin for all users, however IMHO the discussion plugin should not force the use of the tags plugin as not all installation (as mine) is requiring the tags.
comment:3 in reply to: ↑ 2 Changed 8 months ago by rjollos
- Cc rjollos removed
Replying to damato:
it should not throw an error like this if the TagsPlugin is disabled but better hide all the tags features.
Agreed. The way in which the TagsPlugin functionality is provided can be improved on. There are some related problems in #9576 and #8832 that I haven't had time to work on.
I'll get this issue fixed in a moment, so that you aren't held up.
comment:4 Changed 8 months ago by rjollos
Just want to clarify, is the following correct?:
You have?:
tracdiscussion.tags.DiscussionTagProvider = disabled tracdiscussion.tags.DiscussionTags = disabled
Is TagsPlugin enabled or disabled?
comment:5 Changed 8 months ago by damato
No, I had the following:
tracdiscussion.* = enabled tractags.* = disabled
comment:6 Changed 8 months ago by rjollos
Okay, for now the workaround is:
tracdiscussion.admin.discussionwebadmin = enabled tracdiscussion.ajax.discussionajax = enabled tracdiscussion.api.discussionapi = enabled tracdiscussion.core.discussioncore = enabled tracdiscussion.init.discussioninit = enabled tracdiscussion.notification.discussionemailnotification = enabled tracdiscussion.search.discussionsearch = enabled tracdiscussion.tags.discussiontagprovider = disabled tracdiscussion.tags.discussiontags = disabled tracdiscussion.timeline.discussiontimeline = enabled tracdiscussion.wiki.discussionwiki = enabled
I'll have a real fix in place soon.
comment:7 Changed 8 months ago by rjollos
- Resolution set to fixed
- Status changed from assigned to closed
(In [12141]) Fixes #10461, Refs #8832: The components tracdiscussion.tags.DiscussionTags and tractags.api.TagSystem must be enabled in order for TagsPlugin support to be enabled. This is a workaround that will likely be improved on in #8832 as the tags module is redesigned.
comment:8 Changed 8 months ago by rjollos
Please report back if this is working well for you after upgrading to r12141, if you can. Thanks.
comment:9 in reply to: ↑ 2 Changed 8 months ago by rjollos
Replying to damato:
- I also had the permissions for the tags plugin set to disabled for anonymous use and thus the discussion forum also throwed the error for anonymous users.
I may not have adequately covered this case. Could you do some testing and report back?


Do you have TagsPlugin enabled?