Edgewall Software

Ticket #3687 (closed defect: duplicate)

Opened 2 years ago

Last modified 2 years ago

Trac Wiki failing when trying to use the wiki entry to store a custom query

Reported by: anonymous Owned by: jonas
Priority: high Milestone:
Component: wiki system Version: 0.9.6
Severity: major Keywords:
Cc:

Description (last modified by cboos) (diff)

I was following the approach of creating and storing a custom query by copying the query into the Wiki. After editing the wiki page and storing the content below

[query:status=new&status=assigned&status=reopened&group=milestone&verbose=1&component=forms-post-failures&component=design-all&component=design-css&component=forms-mapping-problems&component=post-failures&order=priority  Trac Content Status Report]

I got the error shown below from Trac and now the Wiki doesn't respond:

Python traceback

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/standalone.py", line 303, in _do_trac_req
    dispatch_request(path_info, req, env)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 139, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 107, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.4/site-packages/trac/wiki/web_ui.py", line 116, in process_request
    self._render_view(req, db, page)
  File "/usr/lib/python2.4/site-packages/trac/wiki/web_ui.py", line 364, in _render_view
    req.hdf['wiki.page_html'] = wiki_to_html(page.text, self.env, req)
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 747, in wiki_to_html
    Formatter(env, req, absurls, db).format(wikitext, out, escape_newlines)
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 599, in format
    result = re.sub(self.rules, self.replace, line)
  File "/usr/lib/python2.4/sre.py", line 142, in sub
    return _compile(pattern, 0).sub(repl, string, count)
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 221, in replace
    return getattr(self, '_' + itype + '_formatter')(match, fullmatch)
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 290, in _lhref_formatter
    return self._make_link(ns, target, match, label)
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 295, in _make_link
    util.escape(label, False))
  File "/usr/lib/python2.4/site-packages/trac/ticket/query.py", line 631, in _format_link
    return '<a class="query" href="%s">%s</a>' \
  File "/usr/lib/python2.4/site-packages/trac/ticket/query.py", line 174, in get_href
    format=format, **self.constraints)
TypeError: <lambda>() got multiple values for keyword argument 'verbose'

Attachments

Change History

Changed 2 years ago by cboos

  • description modified (diff)

As a quick workaround, append ?action=edit to the URL of your wiki page, then remove the verbose=1 setting, which is anyway not supported for now.

Changed 2 years ago by sid

Another problem with your query is that you need to use | to separate values from the same field. In your example, this includes the status and component fields. Your query should read:

[query:status=new|assigned|reopened&group=milestone&verbose=1&component=forms-post-failures|design-all|design-css|forms-mapping-problems|post-failures&order=priority  Trac Content Status Report]

And I just tried a similar query (with different components) in the Sandbox with verbose=1 set and it worked fine. So must have been fixed in 0.10.

Changed 2 years ago by sid

Can't find the changeset, but proposing to close this as fixed.

Changed 2 years ago by cboos

  • status changed from new to closed
  • resolution set to duplicate

Actually, looks like it's another duplicate of #2818.

Add/Change #3687 (Trac Wiki failing when trying to use the wiki entry to store a custom query)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from jonas. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.