Sentora Support Forums

Full Version: The selected domain was not valid.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello , did Zpanel upgrade to Sentoria , I had to create the db manually, but now I'm getting probelmas to create subdomains and email , with these errors :

Email:

Quote:The selected domain was not valid.

subdomains:


Quote:Your Domain name is not valid. Please enter a valid Domain Name: i.e. 'domain.com'


anyone have any idea?
Upgrade tool is still beta.

@[kandrews]
Same problem about sub-domaine, and i install from scratch and version 1.0.3

[Image: subdomain.jpg]
Same problem here
@[Me.B]. Any ideas? This is becoming a recurring issue...
It should not and this seem related to new installer post 1.0.3? Upgrade tool?

We are supposed in 1.0.3 to use OLD 1.0 panel code branch and only patching here the FTP issue.

So a bit surprising, I notice the issue firstly reported with upgrades from ZPANEL.
(11-16-2015, 03:37 AM)TGates Wrote: [ -> ]@[Me.B]. Any ideas? This is becoming a recurring issue...

(11-16-2015, 06:34 AM)Me.B Wrote: [ -> ]It should not and this seem related to new installer post 1.0.3? Upgrade tool?

We are supposed in 1.0.3 to use OLD 1.0 panel code branch and only patching here the FTP issue.

So a bit surprising, I notice the issue firstly reported with upgrades from ZPANEL.

My is a fresh install on Debian 8, not upgrade
i have taken my 2 modules that Works

just rename the 2 modules and place this 2
(11-16-2015, 07:34 AM)Diablo925 Wrote: [ -> ]i have taken my 2 modules that Works

just rename the 2 modules and place this 2

Thanks Diablo925! This is a good temporary solution until we get the installer patched again Wink
The root of this problem is in: /etc/sentora/panel/dryden/fs/director.class.php


PHP Code:
   static function CheckForEmptyValue($value) {
 
       if (!empty($value)) {
 
           return false;
 
       } else {
 
           return true;
 
       }
 
   

1.) practical problem
All the values that are ever passed to this function in mailboxes module (and others safe to presume) consist of TRUE or FALSE and are booleans so this function always satisfies the first criteria.

2.) logical and intuitive problem
For some strange reason there's a double negation here "if not empty than false" but it should return "true" if it aint empty for the intuitive part, or even better it should be "if empty than return false" for logic,

3.) becouse of this strange logic in (2) somebody made a mistake when adding domain validation code to: /panel/modules/mailboxes/code/controller.ext.php
PHP Code:
if (!self::IsValidEmail($fulladdress)) {
 
           self::$validemail true;
 
           return false;
 
       }
 if(!self::IsValidDomain($domain)){
 
           self::$validdomain true;
 
           return false;
 
       

as you can see in email validation part a negation is used again to compensate for the bad practice of negation and returning false mentioned in (2) furthermore inside the IsValidEmail it is compensated some more .. it's a mess. anyways whoever added domain validation followed the (no)logic and compensated with negation infront IsValidDomain function BUT this one doesnt comepnsate one more time inside the function so here comes the "the domain was not valid" error. Basically only if it is NOT valid domain the domain is valid boolean is set to TRUE/VALID while whenever the domain is really VALID it results to FALSE. 

A simple solution is to remove "!" from "if(!self::IsValidDomain($domain))" and it will work in all modules where the check is performed.
Next release would be better off refactoring the core functions and logic.
Pages: 1 2