= Description = ## Please read this page. Lines prefixed with ## such as this one are comments, ## you can remove them (except for those after the "Plan" section.) ## Please follow the instructions given in those comments and the text. ## After creating the bug page, please subscribe to it! We may have questions ## that only you can answer, and if you get email when your bug changes it'll ## be much faster to get it fixed since you can answer the questions! RenderAsDocbook action failed with an exception, if the page contains a titlesonly Include macro. {{{ File "/srv/moin/code/1.8/MoinMoin/wikiutil.py", line 2372, in link_tag tag = (formatter.url(1, url, css_class, **kw) + File "/srv/moin/code/1.8/MoinMoin/formatter/text_docbook.py", line 376, in url return self._handleNode("ulink", on, attributes=(('url', url), )) File "/srv/moin/code/1.8/MoinMoin/formatter/text_docbook.py", line 654, in _handleNode node = self.doc.createElement(name) AttributeError: Formatter instance has no attribute 'doc' }}} -- JiangXin <> == Steps to reproduce == ## Describe the steps needed to reproduce the bug. If we can't reproduce it, we probably can't fix it. 1. One page include another page with titlesonly parameter, like this: {{{<>}}} 2. Do a RenderAsDocbook action on the page. == Example == ##Add URL that show the bug, screenshot or test wiki markup that fail... ##URL: ##{{attachment:screenshot.png}} ##{{{ ##Example wiki markup that fail ##}}} [[JiangXin/TestPage|JiangXin/TestPage?action=RenderAsDocbook|&action=RenderAsDocbook]] == Component selection == ## Where you think is this bug happening ? (general, plugin [plugin name], theme [theme name], ... * formatter [text_docbook] == Details == ## If you got a traceback, please save the traceback page as html and attach here: ## [[attachment:traceback.html]] ## if the bug is in this wiki, just kill the table and write: This Wiki. This wiki. == Workaround == ## How to deal with the bug until it is fixed Patch on MoinMoin 1.7.1: {{{#!diff --- a/MoinMoin/formatter/text_docbook.py 2008-09-17 23:09:41.000000000 +0800 +++ b/MoinMoin/formatter/text_docbook.py 2008-09-17 23:47:59.000000000 +0800 @@ -70,6 +70,8 @@ self.doctype = doctype self.curdepth = 0 self.cur = None + if self.include_kludge: + self.startContent() def startDocument(self, pagename): self.doc = dom.createDocument(None, self.doctype, dom.createDocumentType( }}} {{{#!wiki red dotted ''Note:'' * !RenderAsDocbook action works, and no exception raised, but: * But linked titles not appear in rendered docbook text as expected. }}} = Discussion = = Plan = ## This part is for Moin``Moin developers: * Priority: * Assigned to: * Status: ---- ## If you are a moin core developer, replace the category to Category* in these cases: ## Category MoinMoinNoBug - if this is not a bug. ## Category MoinMoinBugConfirmed - if you can confirm the bug on current code. ## Category MoinMoinBugFixed - after the bug is fixed in current code. CategoryMoinMoinBug