#8423 closed defect (fixed)
No rating for project root page
Reported by: | rlrj60 | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | high | Component: | FiveStarVotePlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
FiveStars don't show up in the root page. For example if a project page is foo at example.com, then the root page at the following base_url does not have the rating stars: http://www.example.com/foo
The URL is equivalent to http://www.example.com/foo/wiki/wikiStart page. This was caused by a limitation in voteable_paths:
voteable_paths = ListOption('fivestarvote', 'paths', '/wiki*,/ticket*',
My suggestion is to add '/$' to the voteable_paths to allow the FiveStars to show up in the root page.
voteable_paths = ListOption('fivestarvote', 'paths', '/$', '/wiki*,/ticket*',
Though a small modification is required to map the root page to the wikiStart page:
# Special-case start page with "/" or "/wiki" if resource == '' or resource == 'wiki': resource = 'wiki/WikiStart'
Attached is a complete patch. Thanks for creating such a cool plugin.
Attachments (1)
Change History (7)
Changed 14 years ago by
Attachment: | changeset_1689.diff added |
---|
comment:1 Changed 14 years ago by
Priority: | normal → high |
---|---|
Status: | new → assigned |
comment:2 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 Changed 14 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Thanks for the fix. I really like your new matching regex. Though, the following statements don't work for http://www.example.com/foo because '' + '/WikiStart'
will map the URL to a new page http://www.example.com/foo/WikiStart which does not exist.
if not resource or resource == 'wiki': resource += '/WikiStart'
The following work fine:
if not resource or resource == 'wiki': resource = 'wiki/WikiStart'
comment:4 Changed 14 years ago by
Thanks for catching that. I'm not sure how I could have overlooked that in testing yesterday. Fix will be committed shortly.
comment:5 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:6 Changed 14 years ago by
The initial patch has a suggested change to the paths
option which is being handled in #8426.
Thanks for the patch. I'm testing it now.