Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#8869 closed defect (fixed)

trac-admin should not create templates/site.html

Reported by: jouvin@… 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 Christian Boos, 15 years ago

Owner: set to Christian Boos

There's indeed a check to see if [inherit] templates_dir is set at creation time, and we only create the site.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…).

comment:2 by anonymous, 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 Remy Blank, 15 years ago

Resolution: fixed
Status: newclosed

As of [8952], a site.html.sample is always created, and provides (basic) instructions to activate it and a link as suggested in comment:1.

comment:4 by Remy Blank, 15 years ago

Owner: changed from Christian Boos to Remy Blank

Modify Ticket

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