Edgewall Software
Modify

Opened 9 years ago

Closed 9 years ago

#7686 closed defect (duplicate)

reports do not render any results after locale configuration and apache restart

Reported by: onurgu@… Owned by:
Priority: normal Milestone:
Component: general Version: 0.11
Severity: normal Keywords: needinfo
Cc:
Release Notes:
API Changes:

Description

I made a modification to apache config file related to the trac virtual host which was setting the TracLocale option by:

PythonOption TracLocale "tr_TR.UTF-8"

Then I restarted apache by issuing:

# /etc/init.d/apache2 restart

Now the modification seems to be in effect but none of the reports work. i.e. https://mydomain/trac/projectname/report/1

But custom queries work but if they are in TracQuery syntax. i.e. query:?status=%21closed&order=priority&owner=username

I tried to create a new report with the exact SQL query of the "active tickets" report that comes with the installation.

When I change the log level to DEBUG and check the logs, I see

2008-10-01 10:36:17,017 Trac[perm] DEBUG: No policy allowed USERNAME performing TiCKET_VIEW on <Resource u'ticket:131'>

When I searched this trac for permissions I got http://trac.edgewall.org/ticket/7201

Is this bug related with this ticket?

And is there a workaround or solution?

I appreciate your help and be willing to support you by feeding you with logs or etc in the process

Attachments (0)

Change History (4)

comment:1 Changed 9 years ago by onurgu@…

UPDATE:

I have seen that I had skipped telling you that the complete log:

DEBUG: No policy allowed USERNAME performing TiCKET_VIEW on <Resource u'ticket:XX'>

Note that the permission name is somewhat weird. So I thought that it might be a problem with character set and trac might be flipping the characters up and down somewhere.

So I commented out the modification to apache2.conf and it came back to normal.

But now how could I reenable it without this problem?

I think it needs a patch.

comment:2 Changed 9 years ago by anonymous

I added into the repository several bug alleviated practicum generalities.

comment:3 Changed 9 years ago by Remy Blank

Keywords: needinfo added

We need more information to find out what goes wrong:

  • When you say that "none of the reports work", what is happening? Do you get a blank page? An error page? An empty result set?
  • Are there any other relevant entries in your logs?
  • Do you have any plugins installed? If yes, please try disabling them all, then re-add one at a time until the problem reappears. The last plugin added is probably the cause of the problem.

The string "TiCKET_VIEW" appears nowhere in the Trac sources, so I have no idea where this could come from.

comment:4 in reply to:  3 Changed 9 years ago by Christian Boos

Resolution: duplicate
Status: newclosed

The string "TiCKET_VIEW" appears nowhere in the Trac sources, so I have no idea where this could come from.

This is most likely the same tr_TR locale bug as the one described in #6953, this time with upper():

>>> locale.setlocale(locale.LC_ALL, 'tr_TR')
'tr_TR'
>>> "ticket".upper()
'T\xddCKET'

However:

>>> u"ticket".upper()
u'TICKET'

So we might work around this specific problem this way:

  • trac/ticket/report.py

     
    433433                cell_groups.append(cell_group)
    434434            resource = Resource(realm, row.get('id'))
    435435            # FIXME: for now, we still need to hardcode the realm in the action
    436             if resource.realm.upper()+'_VIEW' not in req.perm(resource):
     436            if unicode(resource.realm).upper()+'_VIEW' not in req.perm(resource):
    437437                continue
    438438            if email_cells:
    439439                for cell in email_cells:

But I'm sure there would be other issues left, so the best advice is still to not use the "tr_TR" locale.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted.
to The owner will be changed from (none) 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.