Modify

Opened 8 years ago

Closed 6 years ago

Last modified 6 years ago

#551 closed defect (fixed)

wiki-format parameter in activator causes error

Reported by: sgrayban Owned by: wanagi
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 7 years ago by anonymous

  • Summary changed from Other macro's don't work inside the folding to wiki-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 6 years ago by anonymous

  • Owner changed from wanagi to anonymous
  • Status changed from new to assigned

comment:3 Changed 6 years ago by huunguyen

I don't know you doing to it.

comment:4 Changed 6 years ago by sgrayban

  • Owner changed from anonymous to wanagi
  • Status changed from assigned to new

comment:5 Changed 6 years ago by sgrayban

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

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 wanagi. 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.