Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#4138 closed defect (fixed)

Links points wrong in a heading

Reported by: ext@… Owned by: Christian Boos
Priority: low Milestone: 0.11
Component: wiki system Version: devel
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Overview Description: The href of a link in a heading points outside the environment.

Steps to Reproduce:

  1. Edit any page
  2. Insert "= [wiki:foo Foo] ="
  3. Save page

Actual Results: All seems fine except the href: http://a-domain.com/wiki/foo

Expected Results: http://a-domain.com/my_env/wiki/foo

Attachments (0)

Change History (8)

comment:1 by Emmanuel Blot, 18 years ago

Double check that your base_url option is well defined in your trac.ini file. See also #4105.

comment:2 by ext@…, 18 years ago

Changing the base_url helps. Why is this necessary when everything else works without this?

in reply to:  2 comment:3 by Christian Boos, 18 years ago

Component: generalwiki
Milestone: 0.11
Owner: changed from Jonas Borgström to Christian Boos
Status: newassigned

Well, because it's a tiny bug ;)

comment:4 by Christian Boos, 18 years ago

Fixed in r4245, but as Emmanuel said, the base_url setting is now nearly mandatory. Perhaps this should be made more apparent in the docs.

I think we should start a TracDev/ReleaseNotes/0.11 page…

in reply to:  4 comment:5 by Emmanuel Blot, 18 years ago

Replying to cboos:

Fixed in r4245, but as Emmanuel said, the base_url setting is now nearly mandatory. Perhaps this should be made more apparent in the docs.

I don't know the internal details so the following suggestion might not be applicable: would there be any way to infer the actual value from other parameters such as TracUriRoot? It seems that the base url parameter needs to be replicated in both the web server configuration file and the trac configuration file, maybe one of them could be retrieved from the other one?

comment:6 by Christian Boos, 18 years ago

The base_url information is effectively derived from the web server configuration in a few situations, and can also be generally recovered from the URL itself (see source:trunk/trac/web/api.py@4245#L152), but there are a few situations where we don't have access to the req, and then the only possibility is to use directly env.abs_href which makes use of the base_url info.

in reply to:  6 comment:7 by Emmanuel Blot, 18 years ago

Replying to cboos:

there are a few situations where we don't have access to the req, and then the only possibility is to use directly env.abs_href which makes use of the base_url info.

I'm pretty sure I miss an important point, but base_url is not tied to a request: it's a static value. Is there no possibiilty to retrieve this value at startup and keep it in the environment, for example?

comment:8 by Christian Boos, 18 years ago

Resolution: fixed
Status: assignedclosed

Actual problem fixed in r4245. If needed, the base_url discussion should be moved elsewhere…

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos 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.