Project

General

Profile

Actions

Bug #6007

closed

JavaScript error in firewall_nat_edit.php for protocols that do not use ports

Added by Phillip Davis over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Start date:
03/17/2016
Due date:
% Done:

100%

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

Description

1) Make a NAT Port Forward rule with some protocol that is not TCP or UDP - e.g. ICMP.
2) Turn on the developer stuff in your browser.
3) Edit the rule.
An error like this is reported:
Uncaught Error: cannot call methods on selectmenu prior to initialization; attempted to call method 'refresh'

It happens in function proto_change() on lines like:
$('#dstbeginport').prop("selectedIndex", 0).selectmenu('refresh');
$('#dstendport').prop("selectedIndex", 0).selectmenu('refresh');
$('#localbeginport').prop("selectedIndex", 0).selectmenu('refresh');

These lines are only executed if the protocol is not TCP or UDP.

This seems to result in odd stuff if you then select TCP as the protocol. The destination port from and to fields are displayed, but it shows from Other to Any.

Does someone know what was intended by that code, and what to do to get the selectmenu method to work?

Actions

Also available in: Atom PDF