Edgewall Software
Modify

Opened 4 years ago

Closed 3 years ago

#13400 closed defect (fixed)

$wikipage.offset() is undefined wiki.js:63 from non-existent wiki page

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 1.4.4
Component: wiki system Version: 1.4.2
Severity: normal Keywords:
Cc: Branch:
Release Notes:

Fix javascript error when viewing non-existing wiki page.

API Changes:
Internal Changes:

Description

Javascript console says when visiting https://trac.edgewall.org/demo-1.4/wiki/NotFound:

18:44:50.803 TypeError: $wikipage.offset() is undefined wiki.js:63:37
    centerLargeElements https://trac.edgewall.org/demo-1.4/chrome/common/js/wiki.js:63
    wikiColumn https://trac.edgewall.org/demo-1.4/chrome/common/js/wiki.js:68
    <anonymous> https://trac.edgewall.org/demo-1.4/wiki/NotFound:70
    jQuery 4
        i
        fireWith
        ready
        K

Patch:

  • trac/htdocs/js/wiki.js

    diff --git a/trac/htdocs/js/wiki.js b/trac/htdocs/js/wiki.js
    index 3953e435a..d89ea9531 100644
    a b  
    44  // within its container ($content).
    55
    66  window.wikiColumn = function($wikipage) {
     7    if ($wikipage.length === 0)
     8      return;
    79    var $content = $("#content");
    810    $("<span id='trac-wiki-expander'></span>").on("click", function () {
    911      $content.toggleClass('narrow');

Attachments (0)

Change History (2)

comment:1 by Ryan J Ollos, 4 years ago

Milestone: 1.4.31.4.4

comment:2 by Jun Omae, 3 years ago

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

Committed in [17556] and merged in [17557].

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.