Edgewall Software

Ticket #4138 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Links points wrong in a heading

Reported by: ext@… Owned by: cboos
Priority: low Milestone: 0.11
Component: wiki system Version: devel
Severity: minor Keywords:
Cc:

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

Change History

  Changed 2 years ago by eblot

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

follow-up: ↓ 3   Changed 2 years ago by ext@…

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

in reply to: ↑ 2   Changed 2 years ago by cboos

  • owner changed from jonas to cboos
  • status changed from new to assigned
  • component changed from general to wiki
  • milestone set to 0.11

Well, because it's a tiny bug ;)

follow-up: ↓ 5   Changed 2 years ago by 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 think we should start a TracDev/ReleaseNotes/0.11 page...

in reply to: ↑ 4   Changed 2 years ago by eblot

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?

follow-up: ↓ 7   Changed 2 years ago by cboos

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   Changed 2 years ago by eblot

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?

  Changed 2 years ago by cboos

  • status changed from assigned to closed
  • resolution set to fixed

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

Add/Change #4138 (Links points wrong in a heading)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cboos. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.