2

Are there occasions where trac rewrites / resets trac.ini on its own?

During normal operation, I sometimes get the error "The environment needs to be upgraded."

However I found that this, apparently, is due to trac resetting trac.ini, with e.g. the [ticket-workflow] section gone missing, as a diff shows.

Restoring trac.ini to a recent backup makes the "upgrade" notice disappear, and operations resume as before. But I'd rather prefer trac not messing with trac.ini unless instructed to do so.

Any hints how to fix this will be appreciated.

  • trac 1.0.9
  • TracAccountManager 0.4.2
  • TracSubTicketsPlugin 0.2.0.dev20160107
0

Reply by RjOllos on the trac-users mailing list:

The loss of [ticket-workflow] is not expected behavior. What is expected behavior: when ticket-workflow is missing, Trac will prompt you to upgrade the environment, which then restores the default ticket-workflow section.

Trac normally changes trac.ini when an update is applied from the Admin pages, and that update needs to be stored in trac.ini rather than the database. Otherwise, Trac won't modify trac.ini. [...] plugins have access to trac.ini, so a plugin could inadvertently do something bad.

[...] you should probably upgrade to AccountManagerPlugin 0.4.4. See changelog and #10871 for more info.

https://trac-hacks.org/browser/accountmanagerplugin/tags/acct_mgr-0.4.4/changelog

https://trac-hacks.org/ticket/10871

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.