Ticket #8828 (closed defect: duplicate)

Opened 2 years ago

Last modified 8 months ago

Creating a Forum with empty tags causes breakage

Reported by: anonymous Assigned to: rjollos
Priority: highest Component: DiscussionPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

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

[[RecentTopics(1,3)]]
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/main.py", line 511, in _dispatch_request
    File "build/bdist.linux-i686/egg/trac/web/main.py", line 237, in dispatch
    File "build/bdist.linux-i686/egg/tracdiscussion/core.py", line 112, in process_request
    File "build/bdist.linux-i686/egg/tracdiscussion/api.py", line 259, in process_discussion
    File "build/bdist.linux-i686/egg/tracdiscussion/api.py", line 852, in _do_actions
    File "build/bdist.linux-i686/egg/tracdiscussion/tags.py", line 75, in forum_deleted
    File "build/bdist.linux-i686/egg/tracdiscussion/tags.py", 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

Change History

05/23/11 19:19:04 changed by Blackhex

  • status changed from new to assigned.
  • priority changed from normal to highest.

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.

(follow-up: ↓ 3 ) 10/06/11 06:48:10 changed by shulegaa@yahoo.com

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 ...

(in reply to: ↑ 2 ) 10/06/11 09:45:08 changed by Blackhex

Is that r9787 or lastest revision?

10/07/11 19:11:46 changed by shulegaa@yahoo.com

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 http://trac-hacks.org/svn/tagsplugin/tags/0.6
Installed /usr/local/lib/python2.7/dist-packages/TracTags-0.6-py2.7.egg
# sudo easy_install http://trac-hacks.org/svn/discussionplugin/0.11
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.

10/09/11 22:17:55 changed by Blackhex

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.

10/09/11 23:49:46 changed by shulegaa@yahoo.com

Apparently, pulling a specific tag/label from track-hacks.org 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
easy_install http://trac-hacks.org/svn/discussionplugin/0.11==r9787
easy_install http://trac-hacks.org/svn/discussionplugin/0.11/tags/r9787
easy_install http://trac-hacks.org/svn/discussionplugin/0.11/tags/r9787/
easy_install http://trac-hacks.org/svn/discussionplugin/tags/r9787
easy_install http://trac-hacks.org/svn/discussionplugin==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.

10/10/11 00:01:04 changed by Blackhex

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 https://trac-hacks.org/svn/discussionplugin/0.11 discussionplugin
cd discussionplugin
python setup.py bdist_egg
cp dist/TracDiscussion-0.8_r9787-py2.6.egg /srv/trac/my-env/plugins/

10/10/12 21:30:43 changed by rjollos

  • status changed from assigned to new.
  • owner changed from Blackhex to rjollos.

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

10/10/12 21:30:52 changed by rjollos

  • status changed from new to closed.
  • resolution set to duplicate.

Add/Change #8828 (Creating a Forum with empty tags causes breakage)




Change Properties
Action