#2413 closed defect (fixed)
[Patch] 0.11 support
Reported by: | Joshua Schmidlkofer | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | IncludeMacro |
Severity: | normal | Keywords: | |
Cc: | Joshua Schmidlkofer | Trac Release: | 0.11 |
Description
Mimeview.render requires a context object. Since I do not know how to obtain a context object from a 'req' object, I changed it from render_macro to expand_macro.
I needed to display wiki pages and nothing worked. Here is the error I got when render_macro called:
out = Mimeview(self.env).render(req, dest_format, out)
error
2008-01-14 14:29:08,498 Trac[api] WARNING: HTML preview using <trac.mimeview.api.WikiTextRenderer object at 0x2aaaafb22390> failed (req) Traceback (most recent call last): File "/var/trac-0.11b1/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg/trac/mimeview/api.py", line 630, in render rendered_content, filename, url) File "/var/trac-0.11b1/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg/trac/mimeview/api.py", line 992, in render content_to_unicode(self.env, content, mimetype)) File "/var/trac-0.11b1/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg/trac/wiki/formatter.py", line 1088, in format_to_html return HtmlFormatter(env, context, wikidom).generate(escape_newlines) File "/var/trac-0.11b1/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg/trac/wiki/formatter.py", line 1046, in generate Formatter(self.env, self.context).format(self.wikidom, out, File "/var/trac-0.11b1/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg/trac/wiki/formatter.py", line 229, in __init__ self.req = context.req File "/var/trac-0.11b1/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg/trac/web/api.py", line 171, in __getattr__ raise AttributeError(name) AttributeError: req
Attachments (1)
Change History (8)
Changed 17 years ago by
Attachment: | includemacros-0.11-nodebug.diff added |
---|
comment:1 follow-up: 4 Changed 17 years ago by
The preview doesn't show - I do not know why. The patch seems to download fine.
comment:2 Changed 15 years ago by
Summary: | IncludeMacro patch to support 0.11 → [Patch] 0.11 support |
---|
comment:3 Changed 14 years ago by
Owner: | changed from Noah Kantrowitz to Ryan J Ollos |
---|---|
Status: | new → assigned |
comment:4 Changed 13 years ago by
Replying to joshland@gmail.com:
The preview doesn't show - I do not know why. The patch seems to download fine.
This is a defect with the trac-hacks site. Thanks for the patch btw, it looks good.
comment:5 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [11266]) Fixes #2413: Replaced call to deprecated render_macro
with expand_macro
.
comment:6 Changed 13 years ago by
This ticket is a follow-on to [3610], where initial work was done to port the 0.10 version of IncludeMacro to 0.11.
should apply cleanly with patch -p2