Opened 9 years ago

Closed 8 years ago

Last modified 7 years ago

#12524 closed defect (fixed)

Brand new project can not be used for new tickets without environment reload

Reported by: anonymous Owned by: Cinc-th
Priority: high Component: SimpleMultiProjectPlugin
Severity: major Keywords:
Cc: Trac Release: 1.0

Description (last modified by Ryan J Ollos)

Hi, this is a really strange behavior I currently can reproduce on my trac 1.0.2 and SimpleMultiProject 0.0.4dev. It seriously took a while to make it reproducible but I finally could figure out that I can not submit a ticket when I select a brand new project for the ticket. I also need to have enabled File logging and have set it to ERROR to trigger this issue.

Steps to reproduce:

  1. Enable File Logging and set it to ERROR (haven't tested with critical).
  2. Create a new Project (name does not matter).
  3. Once you now try to create a new Ticket for the new Project, I'll receive a Warning that the Project "is not a valid value for the project field."

Once the logging is set to WARN, or DEBUG I can create the ticket with the same User-Account and the same content.


Running trac with mod_python behind apache 2.4.10, and yes trac has access to the log file (tail -f trac.log will work)....


Attachments (0)

Change History (7)

comment:1 Changed 9 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 Changed 8 years ago by Cinc-th

Some observations:

If I set

log_type = stderr

all is just fine.


log_type = error

I can see the problem on ticket preview. Note that log_type = error is not a valid setting.


log_type = file

I don't see a problem and a log file is created.

Note that I don't have any log_level set and running Trac using tracd.


log_level = ERROR
log_type = file

I can't see any problem.

Do you have the correct settings in your trac.ini?

comment:3 Changed 8 years ago by falkb

log_file = trac.log
log_format = ......snip......
log_level = WARNING
log_type = file

comment:4 Changed 8 years ago by falkb

but I'm not the ticket creator! Just want to let you know my settings :)

comment:5 Changed 8 years ago by Cinc-th

Owner: changed from falkb to Cinc-th
Priority: lowhigh
Severity: minormajor
Status: newaccepted
Summary: Brand new project can not be used for new tickets when logging is set to errorBrand new project can not be used for new tickets without environment reload

Ok, after diving into Trac looking where the check is done I suspect I'm hunting a ghost here. The author didn't trigger the problem by enabling some special kind of logging.

AFAICS the problem is with not properly adding the new project as a new option to the in memory list of known projects (that's a select custom field with defined options). Tweaking the logging causes a reload of the environment and thus the list is rebuild.

So changing the logging after test to WARN or DEBUG makes the problem magically go away.

comment:6 Changed 8 years ago by Cinc-th

Resolution: fixed
Status: acceptedclosed

In 14973:

Make sure cached value for project.options of ticket-custom field project is up to date by saving config data after changing.

Fixes #12524

comment:7 Changed 8 years ago by Cinc-th

By saving the config data the environment is automatically reloaded. ATM I see no way to update the internal ticket-custom data without reloading the environment.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Cinc-th.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.