Modify ↓
Opened 9 hours ago
Last modified 9 hours ago
#14378 accepted defect
InvalidQuery raised for invalid tag query while rendering wiki text
Reported by: | Jun Omae | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Component: | TagsPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.2 |
Description
Originally reported at https://trac.ffmpeg.org/ticket/11386.
Internal Server Error occurs or page rendering stops due to InvalidQuery
while rendering wiki within invalid tag query like tag:s:s
.
This plugin should ignore such an invalid tag query or render an error message like the behavior for invalid ticket query:
- Rendering for
query:foo&bar
: [Error: Query filter requires field and constraints separated by a "="]
File "/srv/trac-hacks.org/pve/local/lib/python2.7/site-packages/trac/wiki/formatter.py", line 1625, in format_to_html return HtmlFormatter(env, context, wikidom).generate(escape_newlines) File "/srv/trac-hacks.org/pve/local/lib/python2.7/site-packages/trac/wiki/formatter.py", line 1580, in generate escape_newlines) File "/srv/trac-hacks.org/pve/local/lib/python2.7/site-packages/trac/wiki/formatter.py", line 1362, in format result = re.sub(self.wikiparser.rules, self.replace, line) File "/srv/trac-hacks.org/pve/lib/python2.7/re.py", line 155, in sub return _compile(pattern, flags).sub(repl, string, count) File "/srv/trac-hacks.org/pve/local/lib/python2.7/site-packages/trac/wiki/formatter.py", line 1277, in replace replacement = self.handle_match(fullmatch) File "/srv/trac-hacks.org/pve/local/lib/python2.7/site-packages/trac/wiki/formatter.py", line 1273, in handle_match return internal_handler(match, fullmatch) File "/srv/trac-hacks.org/pve/local/lib/python2.7/site-packages/trac/wiki/formatter.py", line 639, in _shref_formatter return self._make_link(ns, target, match, match, fullmatch) File "/srv/trac-hacks.org/pve/local/lib/python2.7/site-packages/trac/wiki/formatter.py", line 690, in _make_link fullmatch) File "/srv/trac-hacks.org/pve/local/lib/python2.7/site-packages/tractags/wiki.py", line 359, in _format_tagged query))): File "/srv/trac-hacks.org/pve/local/lib/python2.7/site-packages/tractags/wiki.py", line 373, in iter_is_empty i.next() File "/srv/trac-hacks.org/pve/local/lib/python2.7/site-packages/tractags/api.py", line 391, in query query = Query(query, attribute_handlers=all_attribute_handlers) File "/srv/trac-hacks.org/pve/local/lib/python2.7/site-packages/tractags/query.py", line 171, in __init__ root = self.parse(tokens) File "/srv/trac-hacks.org/pve/local/lib/python2.7/site-packages/tractags/query.py", line 193, in parse raise InvalidQuery(_("Attribute must be a word")) InvalidQuery: Attribute must be a word
Attachments (0)
Change History (1)
comment:1 Changed 9 hours ago by
Owner: | changed from Ryan J Ollos to Jun Omae |
---|---|
Status: | new → accepted |
Trac Release: | → 1.2 |
Note: See
TracTickets for help on using
tickets.