Bug #6972
closed
"Are you sure you wish to?" prompts and other issues with deleting networks from network-type aliases
Added by Kill Bill about 8 years ago.
Updated over 7 years ago.
Affected Architecture:
All
Description
I randomly keep getting a nonsensical "Are you sure you wish to?" prompt when deleting networks from network-type aliases. It's completely random. Trying to delete the same thing will produce the prompt one time, next time i won't, then another row will produce the prompt, sometimes it does not happen at all, sometimes I'm unable to delete anything without prompt.
Additionally, sometimes clicking the Delete button has absolutely no effect, the row simply won't delete no matter what. Need to drill back to the alias from Firewall - Aliases, ... then it works.
Huh?!
An example:
OK, after a bit of clicking, this is definitely not limited to aliases, let alone network-type ones. I managed to get this randomly with other types of aliases, or with NTP/ACLs (also see Bug #6984 for other results with Delete button). Appears to me the entire rowhelper thing needs major refactoring.
- Assignee set to Anonymous
- Status changed from New to Confirmed
I've found the way to reproduce it. It happens when you click on fa-trash icon. If you click on other areas of the button confirmation is not asked, but if you click exactly on trash icon it triggers the pop up.
Renato Botelho wrote:
It happens when you click on fa-trash icon. If you click on other areas of the button confirmation is not asked, but if you click exactly on trash icon it triggers the pop up.
Indeed. Also, with this hint, I have discovered that the "sometimes clicking the Delete button has absolutely no effect" happens when
- you add a couple of rows, e.g. in Aliases - using the Add Host/Add Network button
- after that, you click on the fa-trash icon to delete those rows again - nothing happens there, funny enough, not even the "Are you sure you wish to?" popup that appears on rows that already existed before the "Edit" action.
- Status changed from Confirmed to Feedback
- Assignee changed from Anonymous to Kill Bill
I am only able to reproduce this with Chrome but it should now be resolved.
- % Done changed from 0 to 100
OK, got to testing. As a good news, the annoying prompt is gone. The second symptom (unable to delete added rows when clicking on the fa-trash icon) definitely persists.
- Status changed from Feedback to Assigned
- Assignee changed from Kill Bill to Anonymous
- % Done changed from 100 to 50
- Assignee changed from Anonymous to Renato Botelho
I am unable to reproduce this in the updated version. Clicking the trash can icon previously did not delete for me, but it does now (in Chrome and all other tested browsers)
Would you please make sure that this is not a cache problem?
This is the change that fixed it for me:
src/usr/local/www/js/pfSenseHelpers.js
@ -375,9 +375,9
@
$('[id^=delete]').click(function(event) {
if ($('.repeatable').length > 1) {
if ((typeof retainhelp) == "undefined")
- moveHelpText(event.target.id);
+ moveHelpText($(this).attr("id"));
- delete_row(event.target.id);
+ delete_row($(this).attr("id"));
} else {
alert('The last row may not be deleted.');
}
To reproduce:
1/ Edit some alias
2/ Add some rows
3/ Now, try to delete them (or the previously existing rows) by clicking on the fa-trash icon.
- Assignee changed from Renato Botelho to Anonymous
- Assignee changed from Anonymous to Renato Botelho
Looks all good here. Thanks. ;)
- Status changed from Assigned to Resolved
- Target version changed from 2.4.0 to 2.3.3
Renato Botelho wrote:
I've found the way to reproduce it. It happens when you click on fa-trash icon. If you click on other areas of the button confirmation is not asked, but if you click exactly on trash icon it triggers the pop up.
Has this ever been backported to 2.3.x? I don't think so, still see the button do nothing with 2.3.4 snaps when you click on the icon (plus another issue with NTP at https://redmine.pfsense.org/issues/6984)
Also available in: Atom
PDF