Modify

Opened 2 years ago

Closed 2 years ago

Last modified 23 months ago

#9787 closed defect (fixed)

Error when navigating to ticket attachment page

Reported by: rjollos Owned by: rjollos
Priority: high Component: PrivateTicketsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description (last modified by rjollos)

2012-02-10 16:25:22,729 Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
  File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/web/main.py", line 522, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/web/main.py", line 243, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/attachment.py", line 460, in process_request
    return self._render_list(req, parent)
  File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/attachment.py", line 735, in _render_list
    parent))
  File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/attachment.py", line 504, in attachment_data
    'can_create': 'ATTACHMENT_CREATE' in context.perm(new_att),
  File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/perm.py", line 553, in has_permission
    return self._has_permission(action, resource)
  File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/perm.py", line 567, in _has_permission
    check_permission(action, perm.username, resource, perm)
  File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/perm.py", line 454, in check_permission
    perm)
  File "build/bdist.linux-x86_64/egg/privatetickets/policy.py", line 44, in check_permission
    return self.check_ticket_access(perm, resource)
  File "build/bdist.linux-x86_64/egg/privatetickets/policy.py", line 58, in check_ticket_access
    tkt = Ticket(self.env, res.id)
  File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/ticket/model.py", line 61, in __init__
    tkt_id = int(tkt_id)
ValueError: invalid literal for int() with base 10: ''


Attachments (1)

AttachmentsPage.png (22.4 KB) - added by rjollos 2 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 2 years ago by rjollos

  • Description modified (diff)
  • Priority changed from normal to high
  • Status changed from new to assigned

Changed 2 years ago by rjollos

comment:2 Changed 2 years ago by rjollos

When navigating to a page such as /attachment/ticket/3, resource.id is an empty string. It looks like this issue will be fixed by replacing ... and resource.id is not None with ... and resource.id in the conditional check that occurs before the call to self.check_ticket_access(perm, resource).

comment:3 Changed 2 years ago by rjollos

(In [11486]) Fixes #9787: Fixed conditional check for a valid resource.id to resolve an error when navigating to a attachment/ticket/id page. Previously, the resource.id was only checked to determine if it was None.

comment:4 Changed 2 years ago by rjollos

This ticket will be left open for feedback and resolved with milestone 2.1 (#9964).

comment:5 Changed 2 years ago by rjollos

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:6 Changed 23 months ago by rjollos

Related to t:#10280.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from rjollos. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.