Opened 12 years ago

Closed 11 years ago

#8828 closed defect (duplicate)

Creating a Forum with empty tags causes breakage

Reported by: anonymous Owned by: Ryan J Ollos
Priority: highest Component: DiscussionPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12


Created a forum with empty tags mistakenly... and now am getting:

Error: Macro RecentTopics(1,3) failed

'Context' object has no attribute 'has_tags'

Can't delete the forum .. I get:

Trac detected an internal error:

NameError: global name 'new_tags' is not defined

Most recent call last:

    File "build/bdist.linux-i686/egg/trac/web/", line 511, in _dispatch_request
    File "build/bdist.linux-i686/egg/trac/web/", line 237, in dispatch
    File "build/bdist.linux-i686/egg/tracdiscussion/", line 112, in process_request
    File "build/bdist.linux-i686/egg/tracdiscussion/", line 259, in process_discussion
    File "build/bdist.linux-i686/egg/tracdiscussion/", line 852, in _do_actions
    File "build/bdist.linux-i686/egg/tracdiscussion/", line 75, in forum_deleted
    File "build/bdist.linux-i686/egg/tracdiscussion/", line 121, in _delete_tags 
OS: CentOS 5.5
Trac 	0.12.2
Trac 	0.12.2
FullBlog 	0.1.1
Genshi 	0.6
mod_python 	3.3.1
pysqlite 	2.6.3
Python 	2.5.5 (r255:77872, Mar 30 2011, 05:21:57) [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)]
Python 	2.5.5 (r255:77872, Mar 30 2011, 05:21:57) [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)]
setuptools 	0.6c11
setuptools 	0.6c11
SilverCity 	0.9.7
SQLite 	3.3.6
Subversion 	1.6.15 (r1038135)
jQuery	1.4.2

Attachments (0)

Change History (9)

comment:1 Changed 12 years ago by Radek Bartoň

Priority: normalhighest
Status: newassigned

Current lastest revision contains unfinished work on tags support. It is not supposed to work :-). I added the note about that to the wiki page but I am not sure when I will get to finish it. Sorry for inconviniences.

comment:2 Changed 12 years ago by shulegaa@…

I'm brand new to Trac. Just installed v0.12. Popped in Discussion and Tags plug-ins. Created a discussion (with a tag). Deleted a discussion. Same error as above! Bummer. It was looking so nice ...

comment:3 in reply to:  2 Changed 12 years ago by Radek Bartoň

Is that r9787 or lastest revision?

comment:4 Changed 12 years ago by shulegaa@…

I literally just installed Trac v0.12 - and then the Discussion and Tags Plugins on a fresh install of Ubuntu 11.04 (and technically within a virtual appliance created by vmbuilder upon that fresh Ubuntu 11.04 Linux KVM host).

Here's what easy_install stashed:

# sudo easy_install
Installed /usr/local/lib/python2.7/dist-packages/TracTags-0.6-py2.7.egg
# sudo easy_install
Installed /usr/local/lib/python2.7/dist-packages/TracDiscussion-0.8_r9877-py2.7.egg

In the same spot, there's Trac-0.12-py2.7.egg.

So, no, it doesn't look like r9787. It looks like a newer r9877.

Cheers, Steffen.

comment:5 Changed 12 years ago by Radek Bartoň

Then it is not supposed to work because since r9788, I started big code refactoring and I haven't finished it yet. Actually, I don't see that I'll finish it in a foreseeable future because I'm pretty occupied with other more important tasks. I'm sorry for that. Use r9787 for now, it should be stabe enouhg.

comment:6 Changed 12 years ago by shulegaa@…

Apparently, pulling a specific tag/label from svn is easier said than done? Well, at least it is for a total Trac noob like myself ;-) So, is there any chance I might impose on a bit more of your most excellent advice/help? I'd be forever grateful for a clue.

FWIW - none of the following easy_install commands work. They all hit 404s. Googling got me nowhere.

easy_install --upgrade TracDisucssion==r9787

I'm sure I'm being incredibly stupid. I must be missing something blindingly obvious. I apologize in advance - but perhaps some other noob will find a bit of clarity on this remedial topic helpful too! Thanks.

comment:7 Changed 12 years ago by Radek Bartoň

I'm not using setuptools this way. This is how I usually produce plugin's egg which I can then install to PYTHON_PATH or environment's plugin directory:

svn co -r 9787 discussionplugin
cd discussionplugin
python bdist_egg
cp dist/TracDiscussion-0.8_r9787-py2.6.egg /srv/trac/my-env/plugins/

comment:8 Changed 11 years ago by Ryan J Ollos

Owner: changed from Radek Bartoň to Ryan J Ollos
Status: assignednew

Duplicate of #8832, which applied a fix for this in [12142].

comment:9 Changed 11 years ago by Ryan J Ollos

Resolution: duplicate
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
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.