Jump to content

Whmcs version 8.3, updateclientdomain.php , not work


Recommended Posts

2 minutes ago, steven99 said:

Provide more info you can ? 

this code not work with updateclientdomain.php (v8.3) but work with updateclientdomain.php(8.1.2)

 

<?php

use WHMCS\Database\Capsule;

add_hook('AfterCronJob', 1, function($vars)
{
    $adminUsername = ''; // Optional for WHMCS 7.2 and later
    
    foreach (Capsule::table('tbldomains')->pluck('id') as $v)
    {
        localAPI('UpdateClientDomain', array('domainid' => $v, 'autorecalc' => true), $adminUsername);
    }

});

Link to comment
Share on other sites

  • 2 months later...

array(2) {
  ["result"]=>
  string(5) "error"
  ["message"]=>
  string(267) "SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'where `id` = ?' at line 1 (SQL: update `tbldomains` set  where `id` = xxx)"
}

 

 

Link to comment
Share on other sites

2 minutes ago, persis said:

array(2) {
  ["result"]=>
  string(5) "error"
  ["message"]=>
  string(267) "SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'where `id` = ?' at line 1 (SQL: update `tbldomains` set  where `id` = xxx)"
}

 

 

Do the same for your query on Capsule. You are not providing id to the API.

Link to comment
Share on other sites

  • WHMCS Technical Analyst II

Hi,

This issue has been resolved in version 8.3 of WHMCS: https://docs.whmcs.com/Changelog:WHMCS_V8.3.0_Beta_1

Quote

CORE-16847 - Prevent erroneous SQL error when there is no change regarding autocalc request to UpdateClientDomain

Once version 8.3 reaches stable release tier, updating to it will resolve this.

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