2
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml"
5
xmlns:py="http://genshi.edgewall.org/"
6
xmlns:xi="http://www.w3.org/2001/XInclude">
7
<xi:include href="layout.html" />
9
<title>${title or 'Error'}</title>
10
<script py:if="frames" type="text/javascript">/*<![CDATA[*/
11
jQuery(document).ready(function($) {
12
$("#traceback a").click(function() {
13
$("div", this.parentNode).slideToggle("fast");
16
$("#tbtoggle").click(function() {
17
if (this.value.indexOf("interactive") < 0) {
18
this.value = "Switch to interactive view";
19
$("#traceback ul").fadeOut("fast", function() {
20
$("#traceback pre").fadeIn("fast");
23
this.value = "Switch to plain text view";
24
$("#traceback pre").fadeOut("fast", function() {
25
$("#traceback ul").fadeIn("fast");
30
/* Only activate interactive view if Javascript is enabled */
31
$("#traceback ul").show();
32
$("#traceback pre").hide();
33
$("#tbtoggle").parent().show();
35
$("#systeminfo").append("<tr><th>jQuery:</th><td>"+$().jquery+"</td></tr>");
36
$("#systeminfo").before("<p>User Agent: <tt>"+navigator.userAgent+"</tt></p>");
39
<script type="text/javascript">/*<![CDATA[*/
40
jQuery(document).ready(function($) {
41
var descr = $("#description").text();
42
descr = descr.replace(/==== System Information ====\s+/m,
43
"User Agent was: `" + navigator.userAgent + "`\n\n$&"
45
descr = descr.replace(/\|\|\s+==== Python Traceback ====/m,
46
"||\n|| '''jQuery:''' || `" + $().jquery + "` $&"
48
$("#description").text(descr);
53
<py:def function="create_ticket(teo=False)">
54
<input type="hidden" name="reporter" value="${get_reporter_id(req)}" />
55
<input py:if="teo" type="hidden" name="version"
56
value="${'dev' in trac.version and 'devel' or trac.version}" />
57
<input type="hidden" name="summary" value="$message" />
58
<textarea id="description" name="description" rows="3" cols="10">
60
==== How to Reproduce ====
62
While doing a $req.method operation on `$req.path_info`, Trac issued an internal error.
64
''(please provide additional details here)''
66
<py:if test="req.args">
73
==== System Information ====
74
<py:for each="k, v in trac.systeminfo">
75
|| '''$k''' || ${'`%s`' % (v and v.replace('\n', '` [[br]] `'))} ||</py:for>
77
==== Python Traceback ====
82
<span class="inlinebuttons">
83
<input type="submit" name="create" value="Create" />
88
<div id="content" class="error">
89
<py:choose test="type">
90
<py:when test="'TracError'">
93
<p py:when="istext(message)" class="message">$message</p>
94
<py:otherwise>$message</py:otherwise>
97
<py:when test="'internal'">
100
<strong>Trac detected an internal error:</strong>
104
<py:when test="'TRAC_ADMIN' not in perm">
105
<p>There was an internal error in Trac. It is recommended
106
that you inform your local
107
<a py:strip="not project.admin" href="mailto:${project.admin}">Trac
108
administrator</a> and give him all the information he needs to
111
<py:if test="not project.admin">
112
<form class="newticket" method="get" action="${href.newticket()}#">
113
<p>To that end, you could ${create_ticket()} a ticket at this
118
The action that triggered the error was:
119
<pre>${req.method}: ${req.path_info}</pre>
123
<p>If you think this should work you can reproduce the problem,
124
you should consider reporting this to the Trac team.</p>
125
<p>Before you do that, though, please first try
126
<a py:with="q = quote_plus(message[:80])"
127
href="${trac.homepage}search?ticket=yes&noquickjump=1&q=$q">searching</a>
128
for similar issues, as it is quite likely that this problem
129
has been reported before. For questions about installation
130
and configuration of Trac, please try the
131
<a href="${trac.homepage}wiki/MailingList">mailing list</a>
132
instead of filing a ticket.
134
<form class="newticket" method="get" action="${trac.homepage}newticket">
135
<p>Otherwise, please ${create_ticket(True)} a new ticket at
136
the Trac project site, where you can describe the problem and
137
explain how to reproduce it.</p>
139
<py:if test="traceback">
140
<h2>Python Traceback</h2>
142
Most recent call last:
143
<ul py:if="frames" style="display: none">
144
<li class="frame" py:for="idx, frame in enumerate(frames)">
145
<a href="#frame${idx}" id="frame${idx}">
146
<span class="file">File "${frame.filename}",
147
line <b>${frame.lineno + 1}</b>, in</span>
148
<var>${frame.function}</var>
150
<div py:if="frame.line" class="source" style="display: none">
151
<h3>Code fragment:</h3>
152
<ol start="${frame.lineno + 1 - len(frame.lines_before)}">
153
<li py:for="line in frame.lines_before"><code>${line or u'\xa0'}</code></li>
154
<li class="current"><code>${frame.line or u'\xa0'}</code></li>
155
<li py:for="line in frame.lines_after"><code>${line or u'\xa0'}</code></li>
158
<div py:if="frame.vars" class="vars" style="display: none">
159
<h3>Local variables:</h3>
160
<table class="listing">
161
<thead><tr><th>Name</th><th>Value</th></tr></thead>
163
<tr py:for="idx, (name, value) in enumerate(sorted(frame.vars.items()))"
164
class="${idx % 2 and 'odd' or None}">
165
<th scope="row"><var>$name</var></th>
166
<td><code>${shorten_line(repr(value))}</code></td>
173
<pre><py:for each="frame in frames">File "${frame.filename}", line ${frame.lineno + 1}, in ${frame.function}<py:if test="frame.line">
174
${frame.line.lstrip()}
175
</py:if></py:for><py:if test="not frames">${traceback}</py:if></pre>
176
<p style="display: none"><input type="button" id="tbtoggle" value="Switch to plain text view" /></p>
179
<h2>System Information:</h2>
180
<table class="listing" id="systeminfo">
181
<tr py:for="name, value in trac.systeminfo">
191
<a href="${href.wiki('TracGuide')}">TracGuide</a> — The Trac User and Administration Guide