Opened 18 years ago
Closed 18 years ago
#5099 closed defect (fixed)
Remaining issues with Genshi post-509
Reported by: | Emmanuel Blot | Owned by: | Jonas Borgström |
---|---|---|---|
Priority: | high | Milestone: | 0.11 |
Component: | general | Version: | devel |
Severity: | normal | Keywords: | genshi |
Cc: | trac@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I'm not sure this is the right way to proceed (feel free to close this ticket if it isn't), but there are some remaining issues with the current trunk and Genshi, so rather than opening one ticket per encountered issue, I'll post the description of several of them within the same ticket.
Attachments (0)
Change History (18)
follow-ups: 4 7 comment:1 by , 18 years ago
comment:2 by , 18 years ago
Another issue while previewing a wiki page: NameError with 'diff'.
The following patch seems to fix up the issue (although I'm not confident in it and won't commit it…):
-
wiki/templates/wiki_edit.html
46 46 </tbody> 47 47 </table> 48 48 <fieldset id="preview" py:choose=""> 49 <legend>${ diffand 'Review Changes' or 'Preview'} (<a href="#edit">skip</a>)</legend>50 <div py:when=" diff" class="diff">49 <legend>${'diff' in req.args and 'Review Changes' or 'Preview'} (<a href="#edit">skip</a>)</legend> 50 <div py:when="'diff' in req.args" class="diff"> 51 51 <xi:include href="diff_div.html" py:with="no_id=True" /> 52 52 </div> 53 53 <div py:otherwise="" class="wikipage">${wiki_to_html(context, page.text)}</div>
comment:3 by , 18 years ago
When an attachment cannot be previewed
-
trac/templates/macros.html
128 128 - 129 129 --> 130 130 <py:def function="preview_file(preview)"> 131 <py:if test="'rendered' in preview"> 131 132 ${preview.rendered} 133 </py:if> 132 134 <py:choose> 133 <p py:when=" not preview.rendered">135 <p py:when="'rendered' not in preview"> 134 136 <strong>HTML preview not available</strong>, 135 137 <py:choose> 136 138 <py:when test="preview.max_file_size_reached">
follow-up: 8 comment:4 by , 18 years ago
Replying to eblot:
Another diff rendering issue occurs while viewing changeset changes.
data['no_id'] = ...
is not defined in changeset.py
comment:5 by , 18 years ago
Another small issue when attempting to add a new milestone (milestones
is not defined)
-
trac/ticket/templates/milestone_edit.html
66 66 value="${format_date(milestone.completed) or format_date}" /> 67 67 <em>Format: ${datetime_hint}</em> 68 68 </label> 69 <py:if test=" milestones">69 <py:if test="defined('milestones')"> 70 70 <br/> 71 71 <input type="checkbox" id="retarget" name="retarget" checked="checked" /> 72 72 <label>Retarget associated open tickets to milestone:
comment:6 by , 18 years ago
Cc: | added |
---|
comment:7 by , 18 years ago
comment:8 by , 18 years ago
follow-up: 10 comment:9 by , 18 years ago
Keywords: | genshi added |
---|
Remaining issues fixed in r5193. Not closing the ticket though, as there are likely more issues with this.
In general for the fixes, we shouldn't use defined()
, as it was only defined itself since [Genshi 510] and we want to retain compatibility with [Genshi 509].
I also tend to favor setting up the correct default values in the model, rather than making the templates look ugly (i.e. using the .get('...')
calls).
comment:10 by , 18 years ago
Replying to cboos:
In general for the fixes, we shouldn't use
defined()
, as it was only defined itself since [Genshi 510] and we want to retain compatibility with [Genshi 509].
Ok, I did not know that and I'll look at your changes to understand how to write clean fixes.
follow-up: 17 comment:11 by , 18 years ago
- Error when some fields have been changed but no comment has been added to a ticket
-
ticket.html
216 216 </py:choose> 217 217 </li> 218 218 </ul> 219 <div py:if=" change.comment" class="comment searchable">219 <div py:if="'comment' in change" class="comment searchable"> 220 220 ${wiki_to_html(context, change.comment)} 221 221 </div> 222 222 </div>
-
follow-up: 15 comment:12 by , 18 years ago
Error with any ticket that does not contain a value for a custom field.
This is the case for tickets that have not been edited after new custom field is added to the configuration file.
UndefinedError is triggered on source:trunk/trac/ticket/templates/ticket.html@5178#L119
<py:if test="field">${ticket[field.name]}</py:if>
follow-up: 16 comment:13 by , 18 years ago
I'm not sure about how to reproduce this one, anyway:
UndefinedError is triggered on source:trunk/trac/ticket/templates/ticket.html@5178#L164
<span class="threading" py:if="replies and 'cnum' in change" py:with="change_replies = replies[str(change.cnum)]">
It seems that the replies
array contains unicode keys, as a typical error is
UndefinedError: {u'2': [3]} has no member named "1"
comment:14 by , 18 years ago
When a new ticket is created then updated with the following actions:
status
is changed- a file is attached
next rendering of the ticket triggers a UndefinedError on source:trunk/trac/ticket/templates/ticket.html@5178#L191
<ul py:if="change.fields" class="changes"> <li py:for="field_name, field in change.fields.items()" py:with="filed_type = field_types[field_name]"> <strong>${field_name}</strong>
UndefinedError: {'status': 'radio', [...]} has no member named "attachment"
comment:15 by , 18 years ago
comment:16 by , 18 years ago
comment:17 by , 18 years ago
Priority: | normal → high |
---|
comment:18 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Looks like we're done with all those little issues.
with [5187], Genshi 532
This error occurs while attempting to review a wiki change.