Project

General

Profile

Bug #7795

NTP status widget: d.getSeconds is not a function

Added by Kill Bill almost 2 years ago. Updated over 1 year ago.

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

100%

Estimated time:
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.

Associated revisions

Revision 3ed475b1 (diff)
Added by Steve Beaver almost 2 years ago

fixed #7795
By changing var name to no longer conflict with ipsec widget

Revision bc2772c1 (diff)
Added by Steve Beaver almost 2 years ago

fixed #7795
By changing var name to no longer conflict with ipsec widget

(cherry picked from commit 3ed475b11dfcb2999a71195987495ccf05808127)

Revision 89c32bf2 (diff)
Added by Steve Beaver almost 2 years ago

fixed #7795
By changing var name to no longer conflict with ipsec widget

(cherry picked from commit 3ed475b11dfcb2999a71195987495ccf05808127)
(cherry picked from commit bc2772c18ef2aa9a32b941fcf79c0c160fad7666)

Revision da058fe4 (diff)
Added by Steve Beaver almost 2 years ago

fixed #7795
By changing var name to no longer conflict with ipsec widget

(cherry picked from commit 3ed475b11dfcb2999a71195987495ccf05808127)
(cherry picked from commit bc2772c18ef2aa9a32b941fcf79c0c160fad7666)

History

#1 Updated by Steve Beaver almost 2 years ago

  • Assignee set to Steve Beaver

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.

#2 Updated by Steve Beaver almost 2 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

#3 Updated by Steve Beaver almost 2 years ago

  • % Done changed from 100 to 0

#4 Updated by Steve Beaver almost 2 years ago

  • % Done changed from 0 to 100

#5 Updated by Kill Bill almost 2 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.

#6 Updated by Steve Beaver almost 2 years ago

  • Status changed from Feedback to Resolved

#7 Updated by Jim Pingle over 1 year ago

  • Target version changed from 2.4.1 to 2.4.0

Also available in: Atom PDF