Opened 11 years ago
Closed 11 years ago
#11302 closed defect (fixed)
AttributeError: 'unicode' object has no attribute 'id'
Reported by: | Owned by: | Steffen Hoffmann | |
---|---|---|---|
Priority: | normal | Component: | TagsPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: |
Description
How to Reproduce
While doing a GET operation on /tags/icm
, Trac issued an internal error.
trac.ini:
[tags] ignore_closed_tickets = true ticket_fields = keywords
icm - keyword from tickets.
On wiki pages and fullblog tags work fine.
Request parameters:
{'blog': u'on', 'ticket': u'on', 'wiki': u'on'}
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0
System Information
Trac | 1.0.1
|
Trac | 1.0.1
|
Docutils | 0.6
|
FullBlog | 0.1.1-r12111
|
Genshi | 0.7 (with speedups)
|
mod_wsgi | 3.3 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL})
|
Pygments | 1.6
|
pysqlite | 2.3.3
|
Python | 2.5.1 (r251:54863, Jul 18 2008, 20:21:35) [GCC 4.3.0 20080428 (ASPLinux 4.3.0-8)]
|
Python | 2.5.1 (r251:54863, Jul 18 2008, 20:21:35) [GCC 4.3.0 20080428 (ASPLinux 4.3.0-8)]
|
pytz | 2009r
|
pytz | 2009r
|
setuptools | 0.6c9
|
setuptools | 0.6c9
|
SQLite | 3.6.12
|
Subversion | 1.5.6 (r36142)
|
jQuery | 1.7.2
|
Enabled Plugins
ColorMacro | r7355
|
Customer | r2
|
PrivateWikis | 1.0.0
|
timingandestimationplugin | 1.3.7
|
TracAnnouncer | 1.0dev-r12503
|
TracFullBlogPlugin | 0.1.1-r12111
|
TracIncludeMacro | 3.0.0dev-r12030
|
TracTags | 0.7dev-r13304
|
Python Traceback
Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 497, in _dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 214, in dispatch resp = chosen_handler.process_request(req) File "/usr/lib/python2.5/site-packages/tractags/web_ui.py", line 134, in process_request macros.expand_macro(formatter, macro, args) \ File "/usr/lib/python2.5/site-packages/tractags/macros.py", line 231, in expand_macro results = sorted(query_result, key=lambda r: \ File "/usr/lib/python2.5/site-packages/tractags/api.py", line 218, in query query_tags) or []: File "/usr/lib/python2.5/site-packages/tractags/ticket.py", line 92, in get_tagged_resources self._check_permission(req, name, 'view'): File "/usr/lib/python2.5/site-packages/tractags/ticket.py", line 61, in _check_permission if self.fast_permcheck or not (resource and resource.id): AttributeError: 'unicode' object has no attribute 'id'
Attachments (0)
Change History (8)
comment:1 follow-up: 2 Changed 11 years ago by
comment:2 Changed 11 years ago by
Replying to hasienda:
I see. It is connected to the permission checking.
Just for completeness:
- 'icm' is a tag from one or more open tickets?
121 open tickets with 'icm' in keywords field
- In that request you follow the tag link from the tag cloud?
yes, from cloud at /trac/tags
url looks like /trac/tags/icm?wiki=on&blog=on&ticket=on
request /trac/tags/icm?wiki=on
and /trac/tags/icm?blog=on
return correct results - list wiki pages and no blog records
- Your 'tags' section option list is complete?
yes. But values 'component' or 'milestone' (or combination) on 'ticket_fields' give the same result
- You don't have a custom 'permission_policies' setting in your 'trac' section in trac.ini, it is just at the default value?
no,
permission_policies = InternalTicketsPolicy, PrivateWikiSystem, DefaultPermissionPolicy, LegacyAttachmentPolicy
comment:4 follow-up: 5 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
it's work! thanks
comment:5 Changed 11 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Replying to bormotov <bormotov@…>:
it's work! thanks
You're welcome. I appreciate your instant test feedback, but leave general ticket processing to me, please. There are different approaches, I know. I found it helpful to keep tickets open until the fix went into a stable release. A good portion of Trac users and admins like to stick to stable revisions, so I use to close tickets at release time. In this case the issue will officially marked as resolved by the upcoming tags-0.7
release. Thank you for taking care.
comment:6 Changed 11 years ago by
Status: | reopened → new |
---|
I see. It is connected to the permission checking.
Just for completeness: