#11406 closed defect (fixed)
diff.css is added twice on the diff_view page
| Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1.2 |
| Component: | general | Version: | |
| Severity: | normal | Keywords: | css |
| Cc: | Branch: | ||
| Release Notes: |
Removed duplicate linking of |
||
| API Changes: |
Plugins using |
||
| Internal Changes: | |||
Description (last modified by )
On a page such as /wiki/WikiStart?action=diff&version=2, the diff.css stylesheet is added to the page twice. I noticed this when trying to modify the CSS in the browser while working on #11403.
The issue happens for all the cases in which diff_view.html is used, since for each case there is a call to add_stylesheet in the Python code as well as the linking of the stylesheet in the template code:
$ grep -R "diff_view\.html" trac --exclude-dir=locale --exclude=*.pyc trac/ticket/web_ui.py: return 'diff_view.html', data, None trac/ticket/web_ui.py: return 'diff_view.html', data, None trac/wiki/templates/wiki_diff.html: <xi:include href="diff_view.html" />
The proposed change is:
-
trac/templates/diff_view.html
diff --git a/trac/templates/diff_view.html b/trac/templates/diff_view.html index 3c74b8a..40542a2 100644
a b 8 8 <xi:include href="layout.html" /> 9 9 <head> 10 10 <title>$title</title> 11 <link rel="stylesheet" type="text/css" href="${chrome.htdocs_location}css/d12 11 <meta name="ROBOTS" content="NOINDEX, NOFOLLOW" /> 13 12 </head>
The issue seems to have been present ever since the template was added in [4347] (it was named ticket_diff.html at that time). #11126 also suggests making this change, but doesn't mention that diff.css is added to the page twice.
It might be better to make the change on the trunk rather than on 1.0-stable since we might be concerned that a plugin utilizing diff_view.html is expecting diff.css to be added by the template.
Attachments (0)
Change History (5)
comment:1 by , 12 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 12 years ago
comment:3 by , 12 years ago
| API Changes: | modified (diff) |
|---|---|
| Milestone: | → 1.1.2 |
| Release Notes: | modified (diff) |
| Resolution: | → fixed |
| Status: | new → closed |
Committed to trunk in [12337].
comment:4 by , 12 years ago
| API Changes: | modified (diff) |
|---|
comment:5 by , 11 years ago
| Description: | modified (diff) |
|---|---|
| Keywords: | css added |



Looks good to me. Please commit it on trunk.