Modify

Opened 17 years ago

Closed 13 years ago

Last modified 13 years ago

#1973 closed defect (fixed)

Problem for Includewikimacro with trac 0.11

Reported by: sibok@… Owned by: Ryan J Ollos
Priority: normal Component: IncludeMacro
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description (last modified by Ryan J Ollos)

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 (0)

Change History (6)

comment:1 Changed 17 years ago by sibok@…

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

comment:2 Changed 15 years ago 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?

comment:3 Changed 14 years ago by Ryan J Ollos

#5221 closed as a duplicate.

comment:4 Changed 14 years ago by Ryan J Ollos

Description: modified (diff)
Owner: changed from Noah Kantrowitz to Ryan J Ollos
Status: newassigned

comment:5 in reply to:  2 Changed 13 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

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.

comment:6 Changed 13 years ago by Ryan J Ollos

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.