On Friday, May 29, 2020 at 7:00:37 PM UTC-7, Aikido Guy wrote:Hi,I have a global trac.ini file that contains [mainnav] information. This global ini file is read-only.I also have a project specfic trac.ini file that is read-and-writable for an older version of Trac that inherits the global ini file.When I perform a trac-admin upgrade of the project specific file, the process adds a new [mainnav] section (and a new [metanav] section) to the project specific trac.ini file- the new [mainnav] section contains different *.order values than my global [mainnav] file- this results in an unexpected tab ordering when I load it in my browserWork around:- If I comment out this new [mainnav] section in my project trac.ini file then my project is displayed with the tabs in the expected order as per my global trac.ini file- No other changes are needed to get it to work properlyQuestion:Is there a way to upgrade all of my 60 projects and keep my [mainnav] items in the correct order as per my global trac.ini file?Kindly,Aikido GuyIn Trac < 1.2, the order is configured through the [trac] mainnav and [trac] metanav entries:The db41 upgrade steps writes these to [mainnav] and [metanav] sections:If you are upgrading from Trac < 1.2 your mainnav and metanav ordering should be configured in the [trac] mainnav and [trac] metanav options
It likely fails to account for the possibility that [trac] mainnav and [trac] metanav are configured in an inherited config file. In that case, it should issue a warning message and not modify the env trac.ini file.
However, since that won't get fixed until at least trac.1.4.2, you'll need a different solution.
Unfortunately it's also tr[ue] that "trac-admin $env config remove mainnav" does not remove the mainnav section.
On Friday, May 29, 2020 at 7:45:08 PM UTC-7, RjOllos wrote:On Friday, May 29, 2020 at 7:00:37 PM UTC-7, Aikido Guy wrote:I have a global trac.ini file that contains [mainnav] information. This global ini file is read-only.
I also have a project specfic trac.ini file that is read-and-writable for an older version of Trac that inherits the global ini file.
When I perform a trac-admin upgrade of the project specific file, the process adds a new [mainnav] section (and a new [metanav] section) to the project specific trac.ini file- the new [mainnav] section contains different *.order values than my global [mainnav] file- this results in an unexpected tab ordering when I load it in my browserWork around:- If I comment out this new [mainnav] section in my project trac.ini file then my project is displayed with the tabs in the expected order as per my global trac.ini file- No other changes are needed to get it to work properlyQuestion:Is there a way to upgrade all of my 60 projects and keep my [mainnav] items in the correct order as per my global trac.ini file?
In Trac < 1.2, the order is configured through the [trac] mainnav and [trac] metanav entries:The db41 upgrade steps writes these to [mainnav] and [metanav] sections:If you are upgrading from Trac < 1.2 your mainnav and metanav ordering should be configured in the [trac] mainnav and [trac] metanav options
Meaning, the inherited config file you used with Trac < 1.0 should have defined the ordering using the [trac] mainnav and [trac] metanav optionsIt likely fails to account for the possibility that [trac] mainnav and [trac] metanav are configured in an inherited config file. In that case, it should issue a warning message and not modify the env trac.ini file.To the point, there is a defect in the upgrade step that will be dealt with in #11306However, since that won't get fixed until at least trac.1.4.2, you'll need a different solution.Unfortunately it's also tr[ue] that "trac-admin $env config remove mainnav" does not remove the mainnav section.Instead, you'll have to remove each option:for opt in wiki ticket newticket timeline roadmap browser search admindotrac-admin $env config remove mainnav $opt.orderdoneWhen the last section option is removed, the section header [mainnav] will also be removed.