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 browser
>
> Work 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 properly
>
> Question:
> 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 Guy
>

In Trac < 1.2, the order is configured through the [trac] mainnav and 
[trac] metanav entries:
https://trac.edgewall.org/wiki/1.0/TracNavigation#nav-order

The db41 upgrade steps writes these to [mainnav] and [metanav] sections:
https://trac.edgewall.org/browser/tags/trac-1.4.1/trac/upgrades/db41.py

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 try 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 admin
do
    trac-admin $env config remove mainnav $opt.order
done

When the last section option is removed, the section header [mainnav] will 
also be removed.

* https://trac.edgewall.org/ticket/13305
* https://trac.edgewall.org/ticket/13306

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/af663a44-0b77-41de-b073-7d46e4da5f04%40googlegroups.com.

Reply via email to