Modify

Opened 18 years ago

Closed 16 years ago

Last modified 16 years ago

#551 closed defect (fixed)

wiki-format parameter in activator causes error

Reported by: Scott Grayban Owned by: Thorsten Ott
Priority: highest Component: FoldingMacro
Severity: blocker Keywords:
Cc: Trac Release: 0.10

Description

Other defined macro's don't work if used inside the folding macro.

Error: Macro Folding(activator,toc1,wiki,== Show TOC ==) failed

href

Usage was:

[[Folding(printscript)]]

[[Folding(activator,toc1,wiki,== Show TOC ==)]]
[[Folding(begin,toc1,none)]]
[[TOC(inline)]]
[[Folding(end)]]

Attachments (0)

Change History (5)

comment:1 Changed 17 years ago by anonymous

Summary: Other macro's don't work inside the foldingwiki-format parameter in activator causes error

It's not the macro inside the folding that causes the problem.



[[Folding(activator,toc1,wiki,== Show TOC ==)]]

Using "none" in stead of "wiki" will let the macro work. (Though in that case you'll have to format the heading yourself.)

Traceback

2006-11-30 22:25:14,745 Trac[macros] ERROR: Wiki macro Folding failed (href)
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/wiki/macros.py", line 459, in render_macro
    return module.execute(req and req.hdf, content, self.env)
  File "/mnt/server/trac/projects/et131x/wiki-macros/Folding.py", line 89, in execute
    content = wiki_to_html(content,env,hdf,db,0)
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 1001, in wiki_to_html
    Formatter(env, req, absurls, db).format(wikitext, out, escape_newlines)
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 236, in __init__
    self.href = absurls and (req or env).abs_href or (req or env).href
  File "/usr/lib/python2.4/site-packages/trac/web/clearsilver.py", line 142, in __getattr__
    return getattr(self.hdf, name)
AttributeError: href
2006-11-30 22:25:14,768 Trac[formatter] ERROR: Macro Folding(activator,idoftheregiontobeunfolded,wiki,=== click me to view ===) failed
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 439, in _macro_formatter
    return macro.process(self.req, args, True)
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 112, in process
    text = self.processor(req, text)
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 100, in _macro_processor
    return self.macro_provider.render_macro(req, self.name, text)
  File "/usr/lib/python2.4/site-packages/trac/wiki/macros.py", line 459, in render_macro
    return module.execute(req and req.hdf, content, self.env)
  File "/mnt/server/trac/projects/et131x/wiki-macros/Folding.py", line 89, in execute
    content = wiki_to_html(content,env,hdf,db,0)
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 1001, in wiki_to_html
    Formatter(env, req, absurls, db).format(wikitext, out, escape_newlines)
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 236, in __init__
    self.href = absurls and (req or env).abs_href or (req or env).href
  File "/usr/lib/python2.4/site-packages/trac/web/clearsilver.py", line 142, in __getattr__
    return getattr(self.hdf, name)
AttributeError: href

comment:2 Changed 16 years ago by anonymous

Owner: changed from Thorsten Ott to anonymous
Status: newassigned

comment:3 Changed 16 years ago by robes

I don't know you doing to it.

comment:4 Changed 16 years ago by Scott Grayban

Owner: changed from anonymous to Thorsten Ott
Status: assignednew

comment:5 Changed 16 years ago by Scott Grayban

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Thorsten Ott.
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.