Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#4001 closed defect (fixed)

Error: Macro TicketQuery(...) failed

Reported by: ilias@… Owned by: Christopher Lenz
Priority: high Milestone: 0.11
Component: ticket system Version: devel
Severity: normal Keywords: query
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Just updated to the latest version, and got an error.

Reproduction:

within wiki, add this macro call:

fails:

[[TicketQuery(status=assigned|new|reopened&order=type, format=table)]]

works:

[[TicketQuery(status=assigned|new|reopened&order=type)]]

error message:

load_template() takes at most 3 arguments (4 given)

Attachments (0)

Change History (7)

comment:1 by ilias@…, 18 years ago

caused by a signature change to this method:

def load_template(self, filename, req=None, data=None, method=None):

def load_template(self, filename, method=None):

http://trac.edgewall.org/changeset/4007/trunk/trac/web/chrome.py

comment:2 by Christopher Lenz, 18 years ago

Component: generalticket system
Keywords: query added
Milestone: 0.11
Owner: changed from Jonas Borgström to Christopher Lenz
Status: newassigned

Oops, that'd be my fault. This should be fixed in the macro anyway, as passing data to the load_template method seems wrong.

comment:3 by ilias@…, 18 years ago

yes, it seems wrong. Although the description sounds rational, too:

    def load_template(self, filename, req=None, data=None, method=None):
        """Retrieve a Template and optionally preset the template data.

        If `req` and `data` are given, the `data` dictionary will be preset
        with the "standard" Trac information and helper methods.

        Also, if the optional `method` argument is set to `'text'`, a
        TextTemplate instance will be created instead of a MarkupTemplate.
        """

btw: who will do the change?

Possibly he can apply those patches, too: #3990

comment:4 by Christopher Lenz, 18 years ago

Resolution: fixed
Status: assignedclosed

Fixed in [4009].

comment:5 by Christian Boos, 18 years ago

… and [4010] helps too ;)

comment:6 by ilias@…, 18 years ago

It would be nice if a commit subjecting a ticket would just cover that ticket, especially if it was a regression.

r4009

  • introduces "fromtimestamp(result.time)" within query.rss
  • renames render_response to render_template
  • add a parameter to render_template
  • exchanges "load_template" by "render_template"

r4010

  • introduces signature change to "render_template"
  • corrects query.py (Macro TicketQuery)

"Trac" assists to keep development trackable, but of course it depends on the developers discipline, too.

comment:7 by ilias@…, 18 years ago

btw.: can I 'get' the patches mentioned in #3990 ?

Modify Ticket

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