Project

General

Profile

Bug #3376

Alias Edit does not display correctly

Added by Phillip Davis about 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
Start date:
12/29/2013
Due date:
% Done:

100%

Estimated time:
Affected Version:
Affected Architecture:

Description

I had a 2.1-RELEASE system and GitSync'd to the 2.1 release branch. I was using Alias Bulk Import, but then also realised this problem is with displaying any Network Alias in firewall_aliases_edit.php
I added a test bulk alias, as in screen shot 1
After saving, the alias looks OK in screen shot 2.
But when I try to edit it (screen shot 3) the CIDR shows as 32 for all the entries.
If I edit and then save, all those entries also get saved as "/32".
If I edit and save any of my network aliases they become "/32" unless I manually change them to the required values again before saving.
When editing a URL Table alias, the Update Freq column is left blank (and the config actually has a number of days).
Using any version of firewall_aliases_edit.php after commit https://github.com/pfsense/pfsense/commit/53523624259f97fb7148d80ae581fa09291e0c55 has this problem. Any version prior to that is OK. Something in the new code there that does jQuery stuff has a problem setting/enabling the CIDR/Update Freq column.

BulkAlias-01-Import.png (18.2 KB) BulkAlias-01-Import.png Phillip Davis, 12/29/2013 07:54 AM
BulkAlias-02-Alias-OK.png (8.79 KB) BulkAlias-02-Alias-OK.png Phillip Davis, 12/29/2013 07:54 AM
BulkAlias-03-Alias-Edit-32.png (27.8 KB) BulkAlias-03-Alias-Edit-32.png Phillip Davis, 12/29/2013 07:54 AM

Associated revisions

Revision 1b9ab14a (diff)
Added by Phillip Davis about 7 years ago

Fix display of CIDR/Update Freq in Alias Edit

Fixes #3376. I have no idea what the "^" characters were meant to do, but removing them makes the CIDR/Update Freq value be displayed correctly when editing. Will there be some other side-effect from removing the "^"?

Revision 44b72c67 (diff)
Added by Phillip Davis about 7 years ago

Fix display of CIDR/Update Freq in Alias Edit

Fixes #3376. I have no idea what the "^" characters were meant to do, but removing them makes the CIDR/Update Freq value be displayed correctly when editing. Will there be some other side-effect from removing the "^"?

Revision 4dd00d25 (diff)
Added by Phillip Davis about 7 years ago

Really fix #3376

Thanks to Grischa Zengel for spotting the semi-colon at the end of the "if" line that was the real cause. Please also back merge this to 2.1 branch.

Revision f71b440b
Added by Renato Botelho about 7 years ago

Merge pull request #896 from phil-davis/master

Really fix #3376 Alias Edit does not display correctly

Revision f70adc82 (diff)
Added by Phillip Davis about 7 years ago

Really fix #3376

Thanks to Grischa Zengel for spotting the semi-colon at the end of the "if" line that was the real cause. Please also back merge this to 2.1 branch.

History

#1 Updated by Phillip Davis about 7 years ago

I have no idea what I am doing with the jQuery stuff, but I pulled out some "^" marks in pull request https://github.com/pfsense/pfsense/pull/867 and now the display is correct. Someone who knows what the "^" were intended to do should look at it and decide what is the real/correct/best fix.

#2 Updated by Phillip Davis about 7 years ago

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

#4 Updated by Grischa Zengel about 7 years ago

With this patch the subnet field won't be disabled like before.
The form uses <select name="address_subnet0" class="ipv4v6" id="address_subnet0" size="1"> with numbered ids.

jQuery("select[id^='address_subnet']") will match "address_subnet.*". http://api.jquery.com/attribute-equals-selector/

jQuery("select[id='address_subnet']") will only match "address_subnet". http://api.jquery.com/attribute-starts-with-selector/

#5 Updated by Grischa Zengel about 7 years ago

The error is the semicolon after
if (set_value == true);

#6 Updated by Phillip Davis about 7 years ago

Thanks for spotting that semi-colon - I spent a while trying to work out what going on, and obviously didn't stare hard enough at every char.
I made another pull request: https://github.com/pfsense/pfsense/pull/896

#8 Updated by Anonymous about 7 years ago

#10 Updated by Renato Botelho about 7 years ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF