#8869 closed defect (fixed)
trac-admin should not create templates/site.html
Reported by: | Owned by: | Remy Blank | |
---|---|---|---|
Priority: | low | Milestone: | 0.12 |
Component: | admin/console | Version: | none |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Since 0.12 if I'm right, trac-admin
is creating an "empty" templates/site.html
as part of initenv
. The intention is probably good but this has the side effect for sites using a standard site.hml
shared by all projects because it hides the site-standard one.
As the file created is doing nothing, it'd be better to have it created as with a name like site.html.example
.
Attachments (0)
Change History (4)
comment:1 by , 15 years ago
Owner: | set to |
---|
comment:2 by , 15 years ago
Thanks for the quick answer. I understand why I had only a few projects affected by this! This was clearly projects first created without the --inherit
(by mistake) with their trac.ini
fixed afterwards (thus lefting the site.html
).
Your suggestion is fine with me. I think this is really preferable as either people don't care about this file or they will be able to deal with the rename… It's better than breaking an existing complex site.
BTW, it'd be nice if it was possible to create a site configuration file for trac-admin
where we could for example define --inherit
value to use by default. The fact it must be given explicitly is fairly error prone…
comment:3 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 15 years ago
Owner: | changed from | to
---|
There's indeed a check to see if
[inherit] templates_dir
is set at creation time, and we only create thesite.html
file if there's not already a global site.html, but I imagine that in your case you must have given the[inherit] templates_dir
after environment creation. Indeed, the only way to get that value at creation time would have been to use the--inherit
flag for specifying the global trac.ini, with that one containing the[inherit] templates_dir
setting.I can imagine you won't be the only one going through this scenario, so I think that we could indeed write a site.html.sample file, with the adequate help content (i.e. advice to rename to site.html, mention that it'll then take precedence over a global site.html and a link to TracInterfaceCustomization#SiteAppearance…).