Modify

Opened 3 years ago

Closed 2 years ago

#8828 closed defect (duplicate)

Creating a Forum with empty tags causes breakage

Reported by: anonymous Owned by: 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 (0)

Change History (9)

comment:1 Changed 3 years ago by Blackhex

  • Priority changed from normal to highest
  • Status changed from new to assigned

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 follow-up: Changed 3 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 3 years ago by Blackhex

Is that r9787 or lastest revision?

comment:4 Changed 3 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 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.

comment:5 Changed 3 years ago 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.

comment:6 Changed 3 years ago by shulegaa@…

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.

comment:7 Changed 3 years ago 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/

comment:8 Changed 2 years ago by rjollos

  • Owner changed from Blackhex to rjollos
  • Status changed from assigned to new

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

comment:9 Changed 2 years ago by rjollos

  • Resolution set to duplicate
  • Status changed from new to closed

Add Comment

Modify Ticket

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