Ticket #1973 (closed defect: fixed)

Opened 5 years ago

Last modified 4 months ago

Problem for Includewikimacro with trac 0.11

Reported by: sibok@tiscali.fr Assigned to: rjollos
Priority: normal Component: IncludeMacro
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description (Last modified by rjollos)

The macros.py of Includewikimacro contains macro = WikiProcessor(self.env, 'Include') for the rendering of the wiki page, whereas now with the version 0.11 the function WikiProcessor() needs a formatter as first argument.

Attachments

Change History

08/27/07 12:13:21 changed by sibok@tiscali.fr

The class IncludeWikiMacro for trac 0.11 is :

class !IncludeWikiMacro(!WikiMacroBase):
    
    # IWikiMacroProvider methods
    def render_macro(self, req, name, content):
		#context = Context(self, req)
		#ctx = Context(self.env, req, db=db, abs_urls=absurls)
		#format = Formatter(self.context)
        macro = !WikiProcessor(Formatter(Context(self.env, req)), 'Include')
        if macro.error:
            return('Need the Include macro - error %s',
                   macro.error)

        if content[:5] == 'wiki:':
            pagename = content[5:]
        else:
            pagename = content

        source="wiki:%s" % pagename

        processed=macro.process(content, source)

        url = req.href.wiki(pagename)

        link = html.A(pagename,
                      href=url)
        
        editlink = html.A("edit",
                          href="%s?action=edit" % url)
        
        return """
        <div align="right"><small>[included from %s [%s]]</small></div>
        <div>%s</div>
        <div align="right"><small>[end of %s]</small></div>
        """ % (link,editlink,processed,pagename)

Benoît

(follow-up: ↓ 5 ) 05/17/10 16:02:07 changed by anonymous

This issue remains with Trac 0.12. Will it ever be resolved? The suggested change by Benoît is probably reasonable. But isn't it time to put that in the released macro?

12/16/10 03:09:05 changed by rjollos

#5221 closed as a duplicate.

12/16/10 03:16:13 changed by rjollos

  • owner changed from coderanger to rjollos.
  • status changed from new to assigned.
  • description changed.

(in reply to: ↑ 2 ) 02/09/12 19:17:54 changed by rjollos

  • status changed from assigned to closed.
  • resolution set to fixed.

Replying to anonymous:

This issue remains with Trac 0.12. Will it ever be resolved? The suggested change by Benoît is probably reasonable. But isn't it time to put that in the released macro?

How so? I don't see any of this existing on the 0.11 branch. If there is a specific issue you are still experiencing, please reopen and provide more details.

02/09/12 19:25:04 changed by rjollos

It looks like maybe you were installing from the very old version attached to the project wiki page, which has been deleted now. Please reinstall from the source, as described on the project wiki page.


Add/Change #1973 (Problem for Includewikimacro with trac 0.11)




Change Properties
Action