Cannot edit IP address in a host override
In either of DNS Forwarder or Resolver:
a) Add some host override, e.g. host 'x' domain 'example.com' IP address '192.168.11.22'
b) Save and Apply
c) Edit the host override. Change the IP address a bit, e.g. '192.168.11.33'
d) Press Save
Validation message is shown "This host/domain already exists."
Press "Save" again. This time it works! And the entry has the changes IP address.
Note: The forum entry talks about having 2 host overrides with the same host+domain, 1 for IPv4 and 1 for IPv6. But actually that complication is not necessary in order to get the bug.
It works OK in 2.3.4-development, so I guess is broken in 2.4 somehow.
It needs a bit of testing to find all the weird things that can go wrong.
#2 Updated by Phillip Davis 12 months ago
PR with more stuff and a slightly different way to fix:
And this bug is a little more widespread/general than in he original report. There is a problem on some edit pages that the "id" is not remembered correctly to be POSTed back. So after pressing save, the "system" thinks it is a new entry. Either:
a) a duplicate entry is created (DNS Forwarder Domain Override Edit) or
b) the validation complains that there is some sort of data duplication problem (thinks the entry is already there, which it is!) and so refuses to save the edit - DNS Forwarder/Resolver Host Override Edit, Captice Portal Voucher Roll Edit.
These problems all are apparent in 2.4 master due to the changes related to $_GET, $_POST, $_REQUEST. But actually the problem has been latent in the code in 2.3.* so the fixes could (should?) be back-ported there also.
#3 Updated by Jim Pingle 12 months ago
- Status changed from New to Feedback
Looks good. I managed to reproduce this late yesterday but left myself a note to check on it this morning again with fresh eyes. Guess I don't have to now :-)
Fix looks good, and I can't reproduce the problem with the patch applied. PR merged. Thanks!