Project

General

Profile

Actions

Bug #7795

closed

NTP status widget: d.getSeconds is not a function

Added by Kill Bill about 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
Start date:
08/22/2017
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
Affected Architecture:
All

Description

Already mentioned in #7784 but creating a separate bug for this.

When you select either the tunnels or the mobile tab on the IPsec widget, the browser console immediately gets spammed with Uncaught TypeError: d.getSeconds is not a function - error logged every second. Traced it to the NTP widget [1], apparently there's some weird interaction between the two widgets.

[1] https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/widgets/widgets/ntp_status.widget.php#L204

P.S. Same problem with 2.3.4-p1.

Actions #1

Updated by Anonymous about 7 years ago

  • Assignee set to Anonymous

Looks like both widgets have a global var called "d". I bet they are stepping on each other. Would have been a good idea to use a widget-name-based prefix with all globals, like ntp_d, ipsec_d etc.

Renaming the var in the NTP widget seems to have fixed the issue.

Actions #2

Updated by Anonymous about 7 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #3

Updated by Anonymous about 7 years ago

  • % Done changed from 100 to 0
Actions #4

Updated by Anonymous about 7 years ago

  • % Done changed from 0 to 100
Actions #5

Updated by Kill Bill about 7 years ago

Steve Beaver wrote:

Looks like both widgets have a global var called "d". I bet they are stepping on each other.

Good catch. The fix works, thanks.

Actions #6

Updated by Anonymous about 7 years ago

  • Status changed from Feedback to Resolved
Actions #7

Updated by Jim Pingle about 7 years ago

  • Target version changed from 2.4.1 to 2.4.0
Actions

Also available in: Atom PDF