Modify ↓
Opened 20 years ago
Closed 20 years ago
#1818 closed defect (duplicate)
Internal error on preview when having an empty heading
| Reported by: | Owned by: | Jonas Borgström | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | wiki system | Version: | |
| Severity: | normal | Keywords: | empty heading |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
To reproduce, go on the sandbox, edit, at the bottom of the textarea, just click on the "Heading" icon, an preview.
Here is the traceback:
Oops...
Trac detected an internal error:
string index out of rangeIf you think this really should work and you can reproduce it. Then you should consider to report this problem to the Trac team.
Go to http://trac.edgewall.com/ and create a new ticket where you describe the problem, how to reproduce it. Don't forget to include the python traceback found below.
TracGuide — The Trac User and Administration Guide
Python traceback
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/trac/ModPythonHandler.py", line 200, in handler
core.dispatch_request(mpr.path_info, mpr, env)
File "/usr/lib/python2.3/site-packages/trac/core.py", line 453, in dispatch_request
module.run(req)
File "/usr/lib/python2.3/site-packages/trac/Module.py", line 46, in run
self.render(req)
File "/usr/lib/python2.3/site-packages/trac/Wiki.py", line 148, in render
self._render_editor(req, pagename, 1)
File "/usr/lib/python2.3/site-packages/trac/Wiki.py", line 266, in _render_editor
info['page_html'] = wiki_to_html(page.text, req.hdf, self.env, self.db)
File "/usr/lib/python2.3/site-packages/trac/WikiFormatter.py", line 619, in wiki_to_html
Formatter(hdf, env, db, absurls).format(wikitext, out)
File "/usr/lib/python2.3/site-packages/trac/WikiFormatter.py", line 596, in format
result = re.sub(rules, self.replace, line)
File "/usr/lib/python2.3/sre.py", line 143, in sub
return _compile(pattern, 0).sub(repl, string, count)
File "/usr/lib/python2.3/site-packages/trac/WikiFormatter.py", line 67, in replace
return getattr(self, '_' + itype + '_formatter')(match, fullmatch)
File "/usr/lib/python2.3/site-packages/trac/WikiFormatter.py", line 385, in _heading_formatter
if anchor[0].isdigit():
IndexError: string index out of range
Attachments (0)
Note:
See TracTickets
for help on using tickets.



This is already fixed in trunk. See #1224 and #1367.