Modify

Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#9787 closed defect (fixed)

Error when navigating to ticket attachment page

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: high Component: PrivateTicketsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description (last modified by Ryan J Ollos)

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 Ryan J Ollos 13 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 13 years ago by Ryan J Ollos

Description: modified (diff)
Priority: normalhigh
Status: newassigned

Changed 13 years ago by Ryan J Ollos

Attachment: AttachmentsPage.png added

comment:2 Changed 13 years ago by Ryan J Ollos

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 13 years ago by Ryan J Ollos

(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 13 years ago by Ryan J Ollos

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

comment:5 Changed 12 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

comment:6 Changed 12 years ago by Ryan J Ollos

Related to t:#10280.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
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.