Hi,
I'm running 378.54_2 on an RT-AC56U.
I've created a custom DDNS script (/jffs/scripts/ddns-start) which is saved and works perfectly when manually called from the CLI. I want it to be called automatically when the WAN IP changes, so having read the instructions I went to the admin pages WAN->DDNS and selected:
Enable the DDNS client: Yes
Server: Custom
Host Name: "my hostname"
Forced refresh interval: 21
However, when I click "Apply", I get the pop-up error message "Account name cannot be blank" and cannot proceed. I have set "Enable JFFS custom scripts and configs" to yes.
This looks like a UI bug (validating a non-existent field?). I see that someone else has reported a similar problem: http://www.snbforums.com/threads/custom-ddns-script-afraid-org-issues.25212/
SOLUTION:
I've had a look at the problem and as suspected the fault lies in the form validation in Advanced_ASUSDDNS_Content.asp
Line 174 of the returned content (line 157 of the source file) reads:
if(document.form.ddns_server_x.selectedIndex != 9){ // Not CUSTOM
This clause is supposed to only carry out the account name validation if a service other than CUSTOM has been selected. It seems that the number of items in the "server" select have been changed without the validation code being updated - the CUSTOM entry now has index 11, not 9. Changing this check to test for 11 instead of 9 solves the problem and the custom DDNS script is run perfectly.
Perhaps this minor fix could be incorporated into the next release?
edit: Updated with source file line number
I'm running 378.54_2 on an RT-AC56U.
I've created a custom DDNS script (/jffs/scripts/ddns-start) which is saved and works perfectly when manually called from the CLI. I want it to be called automatically when the WAN IP changes, so having read the instructions I went to the admin pages WAN->DDNS and selected:
Enable the DDNS client: Yes
Server: Custom
Host Name: "my hostname"
Forced refresh interval: 21
However, when I click "Apply", I get the pop-up error message "Account name cannot be blank" and cannot proceed. I have set "Enable JFFS custom scripts and configs" to yes.
This looks like a UI bug (validating a non-existent field?). I see that someone else has reported a similar problem: http://www.snbforums.com/threads/custom-ddns-script-afraid-org-issues.25212/
SOLUTION:
I've had a look at the problem and as suspected the fault lies in the form validation in Advanced_ASUSDDNS_Content.asp
Line 174 of the returned content (line 157 of the source file) reads:
if(document.form.ddns_server_x.selectedIndex != 9){ // Not CUSTOM
This clause is supposed to only carry out the account name validation if a service other than CUSTOM has been selected. It seems that the number of items in the "server" select have been changed without the validation code being updated - the CUSTOM entry now has index 11, not 9. Changing this check to test for 11 instead of 9 solves the problem and the custom DDNS script is run perfectly.
Perhaps this minor fix could be incorporated into the next release?
edit: Updated with source file line number
Last edited: