Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#12970 closed defect (worksforme)

No buttons for voting up and down

Reported by: xylo23 Owned by: Ryan J Ollos
Priority: normal Component: VotePlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

I installed the plugin correctly (VotePlugin is showing up on the plugins page and is enabled). I further went through all the points in the setup guide, very carefully. I also double checked everything. But the vote up/down buttons do not appear on any page. Not on wiki pages and not on issues.

Is the guide somehow incomplete? Do I have to enable the up/down buttons somewhere else?

Attachments (0)

Change History (14)

comment:1 Changed 8 years ago by xylo23

I'm using trac 1.0.2 and the svn version of the VotePlugin (0.5.1.dev0; installed by running "python setup.py install").

comment:2 Changed 8 years ago by xylo23

Moreover, I have the permissions TRAC_ADMIN, VOTE_MODIFY, and VOTE_VIEW.

The trac.ini contains the [components] and [vote] parts as described in the guide and

trac-admin /path/to/projenv upgrade

went through successfully, and the webserver was restarted.

comment:3 Changed 8 years ago by xylo23

I forgot to mention that my session is set as well:

2016-11-25 20:23:22,182 Trac[session] DEBUG: Retrieving session for ID u'stefan'

I enabled the trac.log with DEBUG mode, but couldn't find any debug message regarding tracvote, except those loading statements:

2016-11-25 20:23:21,628 Trac[loader] DEBUG: Loading tracvote from /usr/local/lib/python2.7/dist-packages/TracVote-0.5.1.dev0-py2.7.egg
Last edited 8 years ago by xylo23 (previous) (diff)

comment:4 Changed 8 years ago by xylo23

I also tried the versions 0.4.0 and 0.5.0, but it's the same behavior.

comment:5 Changed 8 years ago by Ryan J Ollos

Do you have tracvote.js on the page? You can check by viewing the page source (compare with this page on trac-hacks.org).

If you are serving static resources from the webserver (not TracStandalone), you need to run deploy and restart the web server.

comment:6 Changed 8 years ago by xylo23

Oh yes. tracvote.js is missing on the page. I will do the deploy as you suggested. Thanks a lot!

comment:7 Changed 8 years ago by xylo23

I got stuck again. I made the deploy, moved the files to trac's htdocs directory and restarted the server. Now I can access tracvote.js on my server (https://endrullis.de/trac/fubaja/chrome/vote/js/tracvote.js), but the file doesn't get loaded on the trac page. Do I need to edit some html file and include the <script> tag manually or should those header information be added by trac automatically?

comment:8 Changed 8 years ago by Ryan J Ollos

You may need to do a hard refresh of the page to refresh cached resources. I'm not sure I see the mechanism for that in this case, but it's worth a try.

comment:9 in reply to:  6 ; Changed 8 years ago by Ryan J Ollos

Replying to xylo23:

Oh yes. tracvote.js is missing on the page. I will do the deploy as you suggested. Thanks a lot!

I need to update TracPlugins to cover this step. That will probably happen as part of trac:#12288.

comment:10 in reply to:  9 Changed 8 years ago by Ryan J Ollos

Replying to rjollos:

Replying to xylo23:

Oh yes. tracvote.js is missing on the page. I will do the deploy as you suggested. Thanks a lot!

I need to update TracPlugins to cover this step. That will probably happen as part of trac:#12288.

Documented in trac:TracPlugins@92.

comment:11 Changed 8 years ago by Ryan J Ollos

Resolution: worksforme
Status: newclosed

Let me know if you encounter any other issues.

comment:12 Changed 8 years ago by xylo23

Thanks for your help. Unfortunately, I could not get trac to load the tracvote.js file. I added some debug messages to determine whether the line

add_script(req, 'vote/js/tracvote.js')

is executed at all. And it isn't.

I traced it down to the method post_process_request and found out that trac was able to reach the line

for path in self.voteable_paths

but nothing in this for loop is executed. I printed self.voteable_paths and it was:

[]

In the guide it's written that one can set the paths variable to an empty string in the trac.ini to enable voting everywhere:

[vote]
paths = 

That's what I did. Maybe it's not really working that way?

Last edited 8 years ago by xylo23 (previous) (diff)

comment:13 Changed 8 years ago by Ryan J Ollos

Yeah, I think that documentation is out of date. Please try:

[vote]
paths = *

Corrected in VotePlugin@34.

comment:14 Changed 8 years ago by xylo23

Yeah, that works! Thanks a lot!

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.