What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Custom DDNS UI Error / Bug [+solution]

chp

New Around Here
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
 
Last edited:
Changing the index would break again the next time Asus adds a new DDNS provider (as I've seen them doing again in a recent beta). I changed it to look for the name instead of the index value.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top