Opened 16 years ago
Last modified 14 years ago
#5178 new defect
Examples please!
Reported by: | Ariel Balter | Owned by: | dgc |
---|---|---|---|
Priority: | normal | Component: | TracMyPagePlugin |
Severity: | blocker | Keywords: | documentation |
Cc: | Trac Release: | 0.11 |
Description (last modified by )
This sounds great. I have my ini configured as suggested. However, I'm having some problems:
- the mypage option only appears when I'm logged in as an admin, not user
- when I click on the mypage link, I get: "Not Found. The requested URL /wiki/u/admin was not found on this server."
Please provide more detail on what I could put on a mypage and what it would look like. Perhaps you could add some screenshots.
I'm looking forward to start using this plugin.
Thanks, Ariel
Attachments (0)
Change History (6)
comment:1 follow-up: 2 Changed 16 years ago by
comment:2 Changed 14 years ago by
Keywords: | documentation added; mypage screenshot removed |
---|
Replying to anonymous:
Hi Ariel,
I didn't have much trouble running this plugin and I also kept with dgc's instructions.
Same here.
In the instructions the example
[components] mypage.* = enabled [mypage] url = /wiki/u/%sis kinda incomplete or even wrong. It contains one error, maybe two errors.
The first error is the component's name. It's not
mypage
. Because I only activate plugins via the WebAdminPlugin, I discovered the error here. In mytrac.ini
file the following has been included:[components] ... mypageplugin.mypageplugin.mypageplugin = enabled ...
True, but 1. Trac enables any plugin by default and second a simpler
mypageplugin.* = enabled
would be sufficient as well (less error prone regarding typos, if not done via Trac web admin).
Second error (it's only a "maybe error"): The
url
thing only works, if your project is accessible directly on a domain (e.g.my-freaky-project.com
) instead of a special project folder inside a URL ![...]
Try my suggested patch from #4887, please, as I did changes that should effectively remove this limitation. I've tested with a Trac environment, that has such a 'subfolder' URL configuration, and it works. But beware, the expected syntax will change with that patch applied from
/wiki/User/%s
to
/wiki/User/%(user)s
for clarity. Please report back, if you test it.
comment:3 Changed 14 years ago by
hi i tested mypageplugin and userpageplugin and it doesn't work. Can you explain me (with many many details) how can i use it.
I installed both of them and follow all of your directives to do work it, but i can't see in my navbar the mypage option (i checked my permitions MYPAGE_VIEW)
I don't undertand what option can i inform in trac.ini
help me please.
trac.ini
[mypage] url = /wiki/users/%(user)s [userpage] default = public error = u_private root = /wiki/users/ [components] mypageplugin.* = enabled mypage.* = enabled userpageplugin.* = enabled
can you explain me how can i do work it ! Thank you
comment:4 Changed 14 years ago by
Description: | modified (diff) |
---|
Please set log level to debug and post the output here.
comment:5 Changed 14 years ago by
my error :
2011-02-17 10:57:16,238 Trac[main] ERROR: Bad value substitution: section: [mypage] option : url key : user rawval : /wiki/users/%(user)s Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 423, in _dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 164, in dispatch if handler.match_request(req): File "build/bdist.linux-i686/egg/MyPagePlugin/MyPagePlugin.py", line 28, in match_request url = self.mypage_url(req) File "build/bdist.linux-i686/egg/MyPagePlugin/MyPagePlugin.py", line 51, in mypage_url url = self.config.get('mypage', 'url') File "/usr/lib/python2.5/site-packages/trac/config.py", line 68, in get return self[section].get(name, default) File "/usr/lib/python2.5/site-packages/trac/config.py", line 277, in get value = self.config.parser.get(self.name, name) File "/usr/lib/python2.5/ConfigParser.py", line 525, in get return self._interpolate(section, option, value, d) File "/usr/lib/python2.5/ConfigParser.py", line 571, in _interpolate option, section, rawval, e[0]) InterpolationMissingOptionError: Bad value substitution: section: [mypage] option : url key : user rawval : /wiki/users/%(user)s
comment:6 Changed 14 years ago by
Trac detected an internal error: InterpolationMissingOptionError: Bad value substitution: section: [mypage] option : url key : user rawval : /wiki/users/%(user)s
Hi Ariel,
I didn't have much trouble running this plugin and I also kept with dgc's instructions.
Did you grant the
MYPAGE_VIEW
permission to the user's account? That could be the problem...In the instructions the example
is kinda incomplete or even wrong. It contains one error, maybe two errors.
The first error is the component's name. It's not
mypage
. Because I only activate plugins via the WebAdminPlugin, I discovered the error here. In mytrac.ini
file the following has been included:Second error (it's only a "maybe error"): The
url
thing only works, if your project is accessible directly on a domain (e.g.my-freaky-project.com
) instead of a special project folder inside a URL (e.g.my-trac-environment.com/freaky-project
). To make sure the site is accessible, simply throw the leading slash of theurl
value away:If your project is accessible via the second way described (
my-trac-environment.com/freaky-project
) and the logged-in user's account name ismickeymouse
the old option as shown in the example redirects to the wrong URLmy-trac-environment.com/wiki/u/mickeymouse
instead ofmy-trac-environment.com/freaky-project/wiki/u/mickeymouse
.See the difference? Just eliminate the leading slash as described above and try again.
I hope this will help.