persis Posted July 10, 2021 Share Posted July 10, 2021 Hi Whmcs version 8.3, updateclientdomain.php , not work 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted July 10, 2021 Share Posted July 10, 2021 Provide more info you can ? 0 Quote Link to comment Share on other sites More sharing options...
persis Posted July 10, 2021 Author Share Posted July 10, 2021 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); } }); 0 Quote Link to comment Share on other sites More sharing options...
steph.hope Posted July 12, 2021 Share Posted July 12, 2021 (edited) Do you mean v8.1.3? Or 8.2? There's no v8.3 yet. Edited July 12, 2021 by steph.hope 0 Quote Link to comment Share on other sites More sharing options...
persis Posted July 12, 2021 Author Share Posted July 12, 2021 Version:8.2.0 (8.2.0-release.1) not work Version:8.1.3 (8.1.3-release.1) working 0 Quote Link to comment Share on other sites More sharing options...
persis Posted September 15, 2021 Author Share Posted September 15, 2021 please follow : 0 Quote Link to comment Share on other sites More sharing options...
wsa Posted September 15, 2021 Share Posted September 15, 2021 On 7/11/2021 at 10:17 PM, steph.hope said: There's no v8.3 yet. Yes they is a 8.3 but in beta here 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted September 17, 2021 Share Posted September 17, 2021 You should use a return to see where is the issue: $tesult = localAPI('UpdateClientDomain', array('domainid' => $v, 'autorecalc' => true), $adminUsername); var_dump($result); There will be a “result” and “message” if there is an issue. Or you will get “result: success” and API function is OK. 0 Quote Link to comment Share on other sites More sharing options...
persis Posted September 17, 2021 Author Share Posted September 17, 2021 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)"} 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted September 17, 2021 Share Posted September 17, 2021 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. 0 Quote Link to comment Share on other sites More sharing options...
persis Posted September 17, 2021 Author Share Posted September 17, 2021 I manualy hide the ID when copying and pasting for you! I think whmcs codes in this api cant work with mariadb 10.3! I am moving from mariadb to mysql for test... 0 Quote Link to comment Share on other sites More sharing options...
persis Posted September 17, 2021 Author Share Posted September 17, 2021 same result with mariadb 10.5 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted September 18, 2021 Share Posted September 18, 2021 9 hours ago, persis said: I manualy hide the ID when copying and pasting for you! I think whmcs codes in this api cant work with mariadb 10.3! I am moving from mariadb to mysql for test... I’m referring to the sql error. It’s not MariaDB 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst II WHMCS Alex Posted September 18, 2021 WHMCS Technical Analyst II Share Posted September 18, 2021 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. 0 Quote Link to comment Share on other sites More sharing options...
persis Posted September 18, 2021 Author Share Posted September 18, 2021 Many Thanks 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.