JimJ Posted July 5, 2019 Share Posted July 5, 2019 Hi, This is not related to offering our own pre-defined domains as sub domains. This is about a client wanting to host a sub domain of their own domain. If when ordering you select "I will use my existing domain and point it myself" and you enter a sub domain, it is not allowed as the regex seems to be testing for a first level domain and doesn't allow subs. See screenshot. Is there anyway i can change this so a client can order hosting for their own sub domain as per the screenshot? We are seeing this as a huge problem as a lot of clients like to host subs with us. Thanks in advance. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 10, 2019 Share Posted July 10, 2019 Hi Jim, On 05/07/2019 at 20:03, JimJ said: If when ordering you select "I will use my existing domain and point it myself" and you enter a sub domain, it is not allowed as the regex seems to be testing for a first level domain and doesn't allow subs. if I recall correctly, this validation was "enhanced" in v7.7... Quote CORE-12666 - Refine subdomain detection for "Existing Domain" option in cart i've just tried what you want to do in v7.5 and it worked without any issue, so probably would with v7.6 too - but as you say with v7.7+, you'll get the error you describe. and for further on a fix for that specific error, there is a help page below - but those solutions would be irrelevant to your situation as they centre on issues with the TLD, whereas your issue is with the SLD. https://help.whmcs.com/m/85428/l/1034165-troubleshooting-invalid-domain-name-provided-messages On 05/07/2019 at 20:03, JimJ said: Is there anyway i can change this so a client can order hosting for their own sub domain as per the screenshot? We are seeing this as a huge problem as a lot of clients like to host subs with us. whether you can tweak the JS i'm not sure.... just taking the domain as normal at that stage and adding a subdomain product custom field (to be completed on the following page) would be another option. you could slightly (ab)use the existing subdomain option (by editing the configureproductdomain.tpl template), remove the TLD dropdown field and get your users to enter the full subdomain in the box, e.g mysub.mydomain.com the cart will accept it without generating validation errors, but I don't know for sure how it would handle it in the back-end - my inclination is that it would work, but that would need testing. 0 Quote Link to comment Share on other sites More sharing options...
JimJ Posted July 10, 2019 Author Share Posted July 10, 2019 Thanks Brian, really appreciate your input. It used to work for sure but doesn't anymore with the latest version. Not sure the change was thought through properly as basically nobody can signup and host a sub domain anymore unless its a pre-defined one 😞 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 10, 2019 Share Posted July 10, 2019 3 minutes ago, JimJ said: Not sure the change was thought through properly I don't know if it was requested by users, or just another one of those bright ideas that someone had during development... 4 minutes ago, JimJ said: as basically nobody can signup and host a sub domain anymore unless its a pre-defined one 😞 unless they use that template hack I outlined, but that assumes a) you aren't using subdomains as an option already and b) there's no guarantee that WHMCS don't add validation to subdomains in the future, so I don't know how long this solution would last. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.