Edgewall Software
Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#9092 closed defect (worksforme)

Attempt to 'Save Query' in View Tickets fails with "No handler matched request to /report"

Reported by: powderflask@… Owned by:
Priority: normal Milestone:
Component: report system Version: 0.11-stable
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:

Description (last modified by Remy Blank)

A search for this issue turned up this: #7698

But I am running 0.11.7rc1 and have confirmed that it does contain the patch that closed that ticket.

Reproducing bug:

  • change trac.ini to add the lines (as suggested in docs):
    [components]
    trac.ticket.report.* = disabled
    
  • go to /query
  • Save Query
  • Get:
      Error: Not Found
      No handler matched request to /report
    

If I remove the configuration setting, things work as expected, but with the old-style reports. Can save custom queries.

My Trac instance is configured to run as CGI, so no server restart is required on configuration change (and, a server restart did not fix the issue).

Attachments (0)

Change History (5)

comment:1 by Remy Blank, 10 years ago

Saving queries depends on the report module. But if it is disabled, the save button should not be visible. I'll check that.

comment:2 by Remy Blank, 10 years ago

Description: modified (diff)
Milestone: 0.11.7
Resolution: worksforme
Status: newclosed

I cannot reproduce the issue on current 0.11-stable. If I disable the report module, the "Save" button disappears from the query page, because the REPORT_CREATE permission doesn't exist anymore.

Do you have any plugins that re-activate REPORT_* permissions?

comment:3 by anonymous, 10 years ago

OK. sounds sensible, but… I'm following these instructions from TrackReports:

You can already completely replace the reports module by the query module simply by disabling the former in trac.ini:

    [components]
    trac.ticket.report.* = disabled

This will make the query module the default handler for the “View Tickets” navigation item. We encourage you to try this configuration and report back what kind of features of reports you are missing, if any.

This does appear to make the query module the default handler - when I browse to View Tickets, I see the default Query (my active tickets) But there is a Save Query button and it yields the error.

So - I'm reporting back! If there is not Save Query button, how do I create a report with the new query module that replaces the reports module?

I have no additional modules installed - just what came with the Trac tarball.

I do have users with explicit REPORT_CREATE permissions??

Any clues where I might look would be appreciated. Thanks for your quick response on this - awesome!

in reply to:  3 comment:4 by Remy Blank, 10 years ago

Replying to anonymous:

I do have users with explicit REPORT_CREATE permissions??

That was the missing information. If I add REPORT_CREATE explicitly, then disable the report module, I also get the "Save" button.

But this is an incorrect way of using this functionality. Indeed, once the report module is disabled, it is not possible to give REPORT_* permissions to users, and rightfully so. Your system is in an inconsistent state.

Now, you have two options:

  • You want to use reports, but you want the default page for the "View Tickets" item to be the ticket query page. Then, you should look at the [mainnav] section in trac.ini, described on TracNavigation.
  • You don't want to use reports at all. Then you should re-enable the reports module, remove the REPORT_* permissions from all users, then re-disable the reports module. Then, the "Save" button should disappear from the query page.

comment:5 by anonymous, 10 years ago

OK - got it - thanks EVER so much!

For others, from TracQuery:

While Trac does not yet allow saving a named query and somehow making it available in a navigable list, you can save references to queries in Wiki content, as described below.

(Oddly, I can save a Query when the Reports module is on… OK - maybe I'll just delete all the default reports…)

Thank you again for taking time to answer - much obliged.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to as closed 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.