Opened 16 years ago
Closed 14 years ago
#7442 closed defect (duplicate)
[header_logo] src and [project] icon does not use htdocs_location
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | |
Component: | web frontend | Version: | 0.11 |
Severity: | minor | Keywords: | htdocs_location verify |
Cc: | mail@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I have following lines in trac.ini
[header_logo] src = trac_banner.png [project] icon = trac.ico [trac] htdocs_location = /trac/
And I get in HTML lines like these
<link rel="shortcut icon" href="/trac.cgi/chrome/common/trac.ico" type="image/x-icon" /> <link rel="icon" href="/trac.cgi/chrome/common/trac.ico" type="image/x-icon" /> ... <img src="/trac.cgi/chrome/common/trac_banner.png" ...
I assume they should be relative to htdocs_location as well as other static content.
Attachments (0)
Change History (7)
comment:1 by , 16 years ago
Cc: | added |
---|
comment:2 by , 16 years ago
You'll want to look at #6562 as that is closely related - and your expected behaviour is even noted as a possible #TODO
on the ticket and in the source.
The simple workaround is to use an absolute or server-relative URL for the logo - like /myhtdocs/mylogo.png
. That logo source variable will be used as-is by the template.
comment:3 by , 16 years ago
Milestone: | → 1.0 |
---|
comment:4 by , 15 years ago
I think this has been resolved. My trac.ini is
[header_logo] src = site/logo.png
And it correctly maps to the htdocs of the Trac project ($TRACENV/project/htdocs/logo.png).
comment:6 by , 14 years ago
Keywords: | verify added |
---|---|
Milestone: | triaging → next-major-0.1X |
Priority: | normal → low |
comment:7 by , 14 years ago
Milestone: | next-major-0.1X |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
I can confirm this. 0.11 on Gentoo.
Tried to fix it like this:
/usr/lib64/python2.5/site-packages/trac/templates/theme.html
logo.src}" alt="${chrome.logo.alt}"The result was an URL like /project/trac-htdocsproject/trac/chrome/common/site/mylogo.png. What I expected it to be: /project/trac-htdocs/chrome/common/site/mylogo.png.
Related config snippets:
Maybe someone else knows how to do the fix correctly.