Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

Last modified 19 years ago

#935 closed defect (fixed)

Invalid relative path on TracGuideToc.py when invoked from the start page

Reported by: Juanma Barranquero Owned by: Christopher Lenz
Priority: low Milestone: 0.8
Component: wiki system Version: devel
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I've copied TracGuideToc.py for a Contents menu on my own installation. However, if you call it from the main WikiStart page and you've invoked it with

http://localhost/wiki

instead of

http://localhost/wiki/trac

the relative locations for the TOC items are wrong (they refer to http://localhost/trac/MyPage instead of http://localhost/trac/wiki/MyPage. This is not going to fail on the Trac Project site because the TOC is never invoked from WikiStart, but still it'd be better to patch the macro:

  • trac/wikimacros/TracGuideToc.py

     
    3535            cls = ''
    36         html += '<li %s><a href="%s">%s</a></li>' % (cls, ref, title)
     36        html += '<li %s><a href="/trac/wiki/%s">%s</a></li>' % (cls, ref, title)
    3737    return html + '</ul></div>'

Attachments (0)

Change History (8)

comment:1 by Christopher Lenz, 19 years ago

Milestone: 0.8
Owner: changed from Jonas Borgström to Christopher Lenz
Severity: enhancementminor
Status: newassigned

We cannot rely on Trac running under the path /trac, so this patch won't work. However, we should be able to use Href.py to get links that work in any situation.

Let's fix this for 0.8.

comment:2 by Christopher Lenz, 19 years ago

Component: generalwiki
Resolution: fixed
Status: assignedclosed

Should be fixed in [1062].

comment:3 by Christopher Lenz, 19 years ago

Summary: Invalid relative path on !TracGuideToc.py when invoked from /tracInvalid relative path on TracGuideToc.py when invoked from the start page

comment:4 by Juanma Barranquero, 19 years ago

Nice, I didn't know about Href.py (obviously). I'll try to be more careful (use the Source, Luke!).

comment:5 by Juanma Barranquero, 19 years ago

Oh, another comment: TracGuide.py is included in 0.8, but the updated Wiki pages that use it don't (nor are they updated in the trunk).

comment:6 by Christopher Lenz, 19 years ago

They'll be updated directly before the final release.

comment:7 by anonymous, 19 years ago

Summary: Invalid relative path on TracGuideToc.py when invoked from the start pageInvalid relative path on !TracGuideToc.py when invoked from the start page

comment:8 by anonymous, 19 years ago

Summary: Invalid relative path on !TracGuideToc.py when invoked from the start pageInvalid relative path on TracGuideToc.py when invoked from the start page

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.