Opened 5 years ago

# NameError: when trying to delete a ticket

Reported by: Owned by: anonymous normal AnnouncerPlugin normal ticket TypeError 0.12

I got this error in trunk:

Trac [/var/trac/tech]> ticket remove 4
NameError: global name 'page' is not defined


Hmm, couldn't copy/paste the patch here, so i will try to attach it as a file.

### comment:1 follow-up: ↓ 5 Changed 4 years ago by rjollos

#9154 closed as a duplicate, but proposes some alternate patches.

### comment:2 Changed 4 years ago by rjollos

• Description modified (diff)

### comment:3 Changed 4 years ago by rjollos

#7833 closed as a duplicate.

### comment:4 Changed 4 years ago by rjollos

#8065 closed as a duplicate, and it has a patch which we may want to review.

### comment:5 in reply to: ↑ 1 ; follow-up: ↓ 6 Changed 4 years ago by hasienda

#9154 closed as a duplicate, but proposes some alternate patches.

I think this is actually the better one.

### comment:6 in reply to: ↑ 5 ; follow-up: ↓ 7 Changed 4 years ago by rjollos

#9154 closed as a duplicate, but proposes some alternate patches.

I think this is actually the better one.

Are you suggesting the patch in #9154 is better than the patch in this ticket? I hadn't looked closely enough to make a judgement.

### comment:7 in reply to: ↑ 6 Changed 4 years ago by hasienda

#9154 closed as a duplicate, but proposes some alternate patches.

I think this is actually the better one.

Are you suggesting the patch in #9154 is better than the patch in this ticket? I hadn't looked closely enough to make a judgement.

Yes, indeed. While str() is more of hack, #9154 more accurately points at a dedicated method designed for the purpose. I've already integrated it into my patch stack and tests.

### comment:8 Changed 4 years ago by hasienda

(In [12311]) AnnouncerPlugin: Further improve ticket permission checks, refs #5825, #8458 and #8577.

This is a late follow-up to changeset [9813] after more in-deep discussion on permission checking for whole Trac realms and specific Trac resources in #8458. With my original patch proposal from 04-Feb-2011 in mind I call this an aged and really matured changeset, and that's not so bad after all. Furthermore code from [12304] gets improved here as well.

Special thanks to Odd Simon Simonsen, Ryan J. Ollos and Christian Boos for their help on my way towards better understanding Trac permissions.

### comment:9 Changed 16 months ago by rjollos

• Owner doki_pen deleted