Jump to content

DomainRenewalGracePeriods & DomainRenewalMinimums


hazardpro

Recommended Posts

Hi,

 

Im having a issue where the following does not seem to have any effect in my configuration.php file:

 

$DomainRenewalGracePeriods = array(".com"=>"89",".net"=>"89",".biz"=>"89",".info"=>"89",".name"=>"89",".eu"=>"89",".org"=>"89");

$DomainRenewalGracePeriods = array(".co.uk"=>"89",".me.uk"=>"89",".org.uk"=>"89",".uk"=>"89");

$DomainRenewalMinimums = array(".co.uk"=>"364",".me.uk"=>"364",".org.uk"=>"364",".uk"=>"864");

$DomainRenewalMinimums = array(".com"=>"364",".net"=>"364",".biz"=>"364",".info"=>"364",".name"=>"364",".eu"=>"364",".org"=>"364");

 

running version 7.2

 

H

Link to comment
Share on other sites

Any WHMCS people reading this? Can I have some clarification please?

best guarantee to get a response from WHMCS would be by a support ticket... you might strike lucky and get a reply here, but it's been a week already. :roll:

 

https://forum.whmcs.com/showthread.php?110754-Domain-renewal-grace-periods-not-working

https://forums.whmcs.com/showthread.php?115882-DomainMinLengthRestrictions-not-working-with-newgtld

 

if you open a ticket and they admit there is a problem, then it may get fixed in the next v7.3 beta... but frankly, it's not a feature I would ever trust to work and you might find it easier to use alternative solutions... certainly with the renewal page you could use a hook/template code to limit the renewal periods for TLDs.

Link to comment
Share on other sites

  • WHMCS Developer

If you have all of these lines in your configuration.php file, only 1/2 of them are going to apply as you are redefining the same variable twice.

 

1. $DomainRenewalGracePeriods = array(".com"=>"89",".net"=>"89",".biz"=>"89",".inf o"=>"89",".name"=>"89",".eu"=>"89",".org"=>"89" );

2. $DomainRenewalGracePeriods = array(".co.uk"=>"89",".me.uk"=>"89",".org.uk"=>"89 ",".uk"=>"89");

3. $DomainRenewalMinimums = array(".co.uk"=>"364",".me.uk"=>"364",".org.uk"=>" 364",".uk"=>"864");

4. $DomainRenewalMinimums = array(".com"=>"364",".net"=>"364",".biz"=>"364",". info"=>"364",".name"=>"364",".eu"=>"364",".org"=>" 364");

 

So, in the above example, line 1 will be replaced by line 2 so only the options in line 2 would work. The same thing with lines 3 and 4.

 

If you want to separate the options for easy reading, then add them separately:

 

$DomainRenewalGracePeriods = [];

$DomainRenewalGracePeriods['.com'] = 89;

$DomainRenewalGracePeriods['.net'] = 89;

$DomainRenewalGracePeriods['.biz'] = 89;

$DomainRenewalGracePeriods['.info'] = 89;

$DomainRenewalGracePeriods['.eu'] = 89;

$DomainRenewalGracePeriods['.org'] = 89;

$DomainRenewalGracePeriods['.co.uk'] = 89;

$DomainRenewalGracePeriods['.me.uk'] = 89;

$DomainRenewalGracePeriods['.org.uk'] = 89;

$DomainRenewalGracePeriods['.uk'] = 89;

 

The same thing could be done for $DomainRenewalMinimums

 

I have tested this on my own installation of WHMCS and the options are working as expected.

Link to comment
Share on other sites

Excellent thanks - so this should work?

 

$DomainRenewalGracePeriods = [];

$DomainRenewalGracePeriods['.com'] = 89;

$DomainRenewalGracePeriods['.net'] = 89;

$DomainRenewalGracePeriods['.biz'] = 89;

$DomainRenewalGracePeriods['.info'] = 89;

$DomainRenewalGracePeriods['.eu'] = 89;

$DomainRenewalGracePeriods['.org'] = 89;

$DomainRenewalGracePeriods['.co.uk'] = 89;

$DomainRenewalGracePeriods['.me.uk'] = 89;

$DomainRenewalGracePeriods['.org.uk'] = 89;

$DomainRenewalGracePeriods['.uk'] = 89;

$DomainRenewalMinimums ['.co.uk'] = 364;

$DomainRenewalMinimums ['.org.uk'] = 364;

$DomainRenewalMinimums ['.uk'] = 364;

$DomainRenewalMinimums ['.com'] = 364;

$DomainRenewalMinimums ['.net'] = 364;

$DomainRenewalMinimums ['.biz'] = 364;

$DomainRenewalMinimums ['.info'] = 364;

$DomainRenewalMinimums ['.name'] = 364;

$DomainRenewalMinimums ['.eu'] = 364;

$DomainRenewalMinimums ['.org'] = 364;

 

My file doesnt seem to like the first line:

$DomainRenewalGracePeriods = [];

 

Or should that be removed?

 

Ill give this a try now.

 

H

Link to comment
Share on other sites

  • WHMCS Developer

You can change the line $DomainRenewalGracePeriods = []; to

 

$DomainRenewalGracePeriods = array();

 

You also need to define $DomainRenewalMinimums = array(); before using them for the first time:

 

$DomainRenewalGracePeriods = array();
$DomainRenewalGracePeriods['.com'] = 89;
$DomainRenewalGracePeriods['.net'] = 89;
$DomainRenewalGracePeriods['.biz'] = 89;
$DomainRenewalGracePeriods['.info'] = 89;
$DomainRenewalGracePeriods['.eu'] = 89;
$DomainRenewalGracePeriods['.org'] = 89;
$DomainRenewalGracePeriods['.co.uk'] = 89;
$DomainRenewalGracePeriods['.me.uk'] = 89;
$DomainRenewalGracePeriods['.org.uk'] = 89;
$DomainRenewalGracePeriods['.uk'] = 89;

$DomainRenewalMinimums = array();
$DomainRenewalMinimums ['.co.uk'] = 364;
$DomainRenewalMinimums ['.org.uk'] = 364;
$DomainRenewalMinimums ['.uk'] = 364;
$DomainRenewalMinimums ['.com'] = 364;
$DomainRenewalMinimums ['.net'] = 364;
$DomainRenewalMinimums ['.biz'] = 364;
$DomainRenewalMinimums ['.info'] = 364;
$DomainRenewalMinimums ['.name'] = 364;
$DomainRenewalMinimums ['.eu'] = 364;
$DomainRenewalMinimums ['.org'] = 364;
Link to comment
Share on other sites

i'm still not convinced that this works... so in my v7.2.3 configuration file, i've got...

 

$DomainRenewalMinimums = array();
$DomainRenewalMinimums ['.com'] = 364;

so logically, that should prevent the user from renewing a .com until at least 1 year before expiry... yet in the client area, they still can...

 

2Po83bD.png

 

now I could change that figure of 364 to 100 or 1000 and it wouldn't make any difference - the client can still renew the domain regardless of these settings.

am I missing something here, or misinterpreting what the feature is for ?? :?:

Link to comment
Share on other sites

  • WHMCS Developer

The DomainRenewalMinimums setting is the number of days before renewal that a renewal is allowed.

 

If you set 364, then you are allowing a renewal 364 days before the next renewal.

 

So, I have a test domain with an expiry dates of 15th August 2018.

 

This is 345 days in the future.

 

 

With the following the configuration.php file:

 

$DomainRenewalMinimums['.com'] = 364;

 

Screen Shot 2017-09-04 at 14.43.28.png

 

I then update this to:

 

$DomainRenewalMinimums['.com'] = 344;

 

Screen Shot 2017-09-04 at 14.43.39.png

Link to comment
Share on other sites

jeez - it might have helped if I had changed the file permissions on the configuration file from 400 first ! :twisted:

 

$DomainRenewalMinimums ['.com'] = 200;

Gcec2gf.png

 

using this format, even $DomainMinLengthRestrictions works... up to a point! :roll:

 

$DomainMinLengthRestrictions = array();
$DomainMinLengthRestrictions[".actor"] = 15;

it prevents the ordering, but shows an unhelpful error message - "Domains must begin with a letter or a number"... even though it does start with a letter.

 

YJaCUNZ.png

if you specify both custom minimums AND maximums (or it uses a default for one), then you can get a semi-appropriate error message...

 

Mohr7ah.png

.. i'd be inclined to call that output a bug (or in WHMCS jargon - the output needs clarifying based on the error that causes it) - I could probably tweak it in the language strings, js and/or template - but I think it needs looking at by WHMCS... it's starting with a letter or number, it's just breaking the length requirements and only needs to say "{$tld} domains must be between <span class="min-length"></span> and <span class="max-length"></span> characters in length" or something along those lines...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated