Modify

Opened 10 years ago

Closed 10 years ago

#12254 closed defect (fixed)

ERROR: Macro TOC(None) failed

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Component: TocMacro
Severity: normal Keywords:
Cc: Trac Release:

Description

Discovered the following in the logs:

2015-03-26 15:22:39,202 Trac[formatter] ERROR: Macro TOC(None) failed:
Traceback (most recent call last):
  File "/path/to/pve/lib/python2.6/site-packages/Trac-1.0.5-py2.6.egg/trac/wiki/formatter.py", line 788, in _macro_formatter
    return macro.ensure_inline(macro.process(args))
  File "/path/to/pve/lib/python2.6/site-packages/Trac-1.0.5-py2.6.egg/trac/wiki/formatter.py", line 358, in process
    text = self.processor(text)
  File "/path/to/pve/lib/python2.6/site-packages/Trac-1.0.5-py2.6.egg/trac/wiki/formatter.py", line 345, in _macro_processor
    text)
  File "/path/to/pve/lib/python2.6/site-packages/TracTocMacro-11.0.0.4_r13602-py2.6.egg/tractoc/macro.py", line 190, in expand_macro
    if pagename.endswith('*'):
AttributeError: 'int' object has no attribute 'endswith'

Attachments (0)

Change History (2)

comment:1 Changed 10 years ago by Ryan J Ollos

Status: newaccepted

This happens if [[TOC]] is inserted in a ticket. I don't see how it would be useful to use the macro on a ticket page, but rather than restrict usage to certain realms I'll just convert resource.id to unicode.

comment:2 Changed 10 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 14509:

11.0.0.5: Avoid traceback by ensuring that resource.id is a string. Fixes #12254.

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.