Edgewall Software
Modify

Opened 6 months ago

Closed 6 months ago

#13753 closed defect (fixed)

blame.js is not added when blame view with an empty file

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 1.6.1
Component: version control/browser Version: 1.0.20
Severity: normal Keywords:
Cc: Branch:
Release Notes:

Fixed enableBlame is not defined javascript error when viewing an empty file with blame view.

API Changes:
Internal Changes:

Description

I noticed the following javascript error raises when blame view with an empty file.

09:44:43.906 Uncaught ReferenceError: enableBlame is not defined
    <anonymous> https://trac.edgewall.org/browser/trunk/tracopt/__init__.py?annotate=blame&rev=8695:99

Attachments (0)

Change History (3)

comment:1 by Jun Omae, 6 months ago

Milestone: next-stable-1.6.x1.6.1
Owner: set to Jun Omae
Status: newassigned

I consider that handling the returned value of IHTMLPreviewRenderer.render() is incorrect. I'll try to add unit tests for it…

  • trac/mimeview/api.py

    diff --git a/trac/mimeview/api.py b/trac/mimeview/api.py
    index 64b62f3b8..2bad9839c 100644
    a b class Mimeview(Component):  
    821821                          renderer=renderer.__class__.__name__,
    822822                          err=exception_to_unicode(e)))
    823823            else:
    824                 if not result:
     824                if result is None:
    825825                    continue
    826826
    827827                if not (force_source or getattr(renderer, 'returns_source',

comment:2 by Jun Omae, 6 months ago

Version: 1.61.0.20

The same issue occurs on Trac 1.0.x through 1.6.x.

comment:3 by Jun Omae, 6 months ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Fixed in [17814] and merged in [17815].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.