Modify

Opened 7 years ago

Closed 2 years ago

Last modified 2 years ago

#1973 closed defect (fixed)

Problem for Includewikimacro with trac 0.11

Reported by: sibok@… Owned by: 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 (0)

Change History (6)

comment:1 Changed 7 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 follow-up: Changed 4 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 3 years ago by rjollos

#5221 closed as a duplicate.

comment:4 Changed 3 years ago by rjollos

  • Description modified (diff)
  • Owner changed from coderanger to rjollos
  • Status changed from new to assigned

comment:5 in reply to: ↑ 2 Changed 2 years ago by rjollos

  • Resolution set to fixed
  • Status changed from assigned to closed

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 2 years ago 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 Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from rjollos. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.