#4001 closed defect (fixed)
Error: Macro TicketQuery(...) failed
Reported by: | 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 , 18 years ago
comment:2 by , 18 years ago
Component: | general → ticket system |
---|---|
Keywords: | query added |
Milestone: | → 0.11 |
Owner: | changed from | to
Status: | new → assigned |
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 , 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:6 by , 18 years ago
It would be nice if a commit subjecting a ticket would just cover that ticket, especially if it was a regression.
- 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"
- 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.
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