Apex Managed Services Posted April 21, 2020 Share Posted April 21, 2020 Hello all, I am wondering if anyone can assist me here with my issue. After upgrading to the latest version, anyone that places an order with a coupon code it throws up the following error: Oops! Something went wrong and we couldn't process your request. PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'promocount' in 'field list' in /home2/apexman1/public_html/clients/vendor/illuminate/database/Connection.php:462Stack trace:#0 /home2/apexman1/public_html/clients/vendor/illuminate/database/Connection.php(462): PDO->prepare('update `tblhost...')#1 /home2/apexman1/public_html/clients/vendor/illuminate/database/Connection.php(706): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'update `tblhost...', Array)#2 /home2/apexman1/public_html/clients/vendor/illuminate/database/Connection.php(669): Illuminate\Database\Connection->runQueryCallback('update `tblhost...', Array, Object(Closure))#3 /home2/apexman1/public_html/clients/vendor/illuminate/database/Connection.php(467): Illuminate\Database\Connection->run('update `tblhost...', Array, Object(Closure))#4 /home2/apexman1/public_html/clients/vendor/illuminate/database/Connection.php(410): Illuminate\Database\Connection->affectingStatement('update `tblhost...', Array)#5 /home2/apexman1/public_html/clients/vendor/illuminate/database/Query/Builder.php(2071): Illuminate\Database\Connection->update('update `tblhost...', Array)#6 /home2/apexman1/public_html/clients/vendor/illuminate/database/Query/Builder.php(2105): Illuminate\Database\Query\Builder->update(Array)#7 /home2/apexman1/public_html/clients/vendor/illuminate/database/Eloquent/Builder.php(546): Illuminate\Database\Query\Builder->increment('promocount', 1, Array)#8 /home2/apexman1/public_html/clients/vendor/illuminate/database/Eloquent/Model.php(1387): Illuminate\Database\Eloquent\Builder->increment('promocount', 1, Array)#9 /home2/apexman1/public_html/clients/vendor/illuminate/database/Eloquent/Model.php(1352): Illuminate\Database\Eloquent\Model->incrementOrDecrement('promocount', 1, Array, 'increment')#10 [internal function]: Illuminate\Database\Eloquent\Model->increment('promocount')#11 /home2/apexman1/public_html/clients/vendor/illuminate/database/Eloquent/Model.php(3489): call_user_func_array(Array, Array)#12 /home2/apexman1/public_html/clients/includes/processinvoices.php(0): Illuminate\Database\Eloquent\Model->__call('increment', Array)#13 /home2/apexman1/public_html/clients/includes/orderfunctions.php(0): getInvoiceProductPromo(0, 2, 1, 27, 14.99)#14 /home2/apexman1/public_html/clients/cart.php(0): calcCartTotals(true, false, Array)#15 {main}Next Illuminate\Database\QueryException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'promocount' in 'field list' (SQL: update `tblhosting` set `promocount` = `promocount` + 1, `updated_at` = 2020-04-21 07:48:06 where `id` = 27) in /home2/apexman1/public_html/clients/vendor/illuminate/database/Connection.php:713Stack trace:#0 /home2/apexman1/public_html/clients/vendor/illuminate/database/Connection.php(669): Illuminate\Database\Connection->runQueryCallback('update `tblhost...', Array, Object(Closure))#1 /home2/apexman1/public_html/clients/vendor/illuminate/database/Connection.php(467): Illuminate\Database\Connection->run('update `tblhost...', Array, Object(Closure))#2 /home2/apexman1/public_html/clients/vendor/illuminate/database/Connection.php(410): Illuminate\Database\Connection->affectingStatement('update `tblhost...', Array)#3 /home2/apexman1/public_html/clients/vendor/illuminate/database/Query/Builder.php(2071): Illuminate\Database\Connection->update('update `tblhost...', Array)#4 /home2/apexman1/public_html/clients/vendor/illuminate/database/Query/Builder.php(2105): Illuminate\Database\Query\Builder->update(Array)#5 /home2/apexman1/public_html/clients/vendor/illuminate/database/Eloquent/Builder.php(546): Illuminate\Database\Query\Builder->increment('promocount', 1, Array)#6 /home2/apexman1/public_html/clients/vendor/illuminate/database/Eloquent/Model.php(1387): Illuminate\Database\Eloquent\Builder->increment('promocount', 1, Array)#7 /home2/apexman1/public_html/clients/vendor/illuminate/database/Eloquent/Model.php(1352): Illuminate\Database\Eloquent\Model->incrementOrDecrement('promocount', 1, Array, 'increment')#8 [internal function]: Illuminate\Database\Eloquent\Model->increment('promocount')#9 /home2/apexman1/public_html/clients/vendor/illuminate/database/Eloquent/Model.php(3489): call_user_func_array(Array, Array)#10 /home2/apexman1/public_html/clients/includes/processinvoices.php(0): Illuminate\Database\Eloquent\Model->__call('increment', Array)#11 /home2/apexman1/public_html/clients/includes/orderfunctions.php(0): getInvoiceProductPromo(0, 2, 1, 27, 14.99)#12 /home2/apexman1/public_html/clients/cart.php(0): calcCartTotals(true, false, Array)#13 {main} Has anyone else had or has this issue and knows how to resolve it, I would be grateful. I have logged a ticket but its been over 24hrs and no acknowledgement to say they are looking at it has been received and I thought I would get a quicker answer here. Thank you Aaron 0 Quote Link to comment Share on other sites More sharing options...
Apex Managed Services Posted April 22, 2020 Author Share Posted April 22, 2020 Just so everyone knows, the following resolution was provided by WHMCS Peter, but thought I would share it incase anyone else gets the same issue, run this command should resolve everything. alter table `tblhosting` add `promocount` INT(10) NULL DEFAULT '0' AFTER `promoid` Obviously do you back ups first :) 0 Quote Link to comment Share on other sites More sharing options...
Brandonm Posted May 1, 2020 Share Posted May 1, 2020 Same issue here but when I try the resolution I get: MySQL said: Documentation 1067 - Invalid default value for 'termination_date' Any suggestions? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst II WHMCS Alex Posted May 1, 2020 WHMCS Technical Analyst II Share Posted May 1, 2020 Hello @Brandonm, That indicates your MySQL server is in strict mode, disabling that will allow you to execute the query successfully: https://help.whmcs.com/m/installation/l/678317-disabling-mysql-strict-mode 0 Quote Link to comment Share on other sites More sharing options...
Brandonm Posted May 1, 2020 Share Posted May 1, 2020 @WHMCS Alex faster than an actual support ticket. Thanks that worked! 0 Quote Link to comment Share on other sites More sharing options...
KTP Posted May 3, 2020 Share Posted May 3, 2020 I used Softaclouse from my Cpanel and did and automatic update after that i started getting Oops error 403 only when i enter my admin user name and password ERROR LOG: [03-May-2020 00:23:34 UTC] [WHMCS Application] ERROR: Error: Class 'WHMCS\Installer\Update\Updater' not found in /home/loudjusf/public_html/vendor/whmcs/whmcs-foundation/lib/Application.php:0 Stack trace: #0 /home/loudjusf/public_html/vendor/illuminate/support/Facades/Facade.php(215): WHMCS\Application->isUpdateAvailable() #1 /home/loudjusf/public_html/vendor/whmcs/whmcs-foundation/lib/Admin.php(0): Illuminate\Support\Facades\Facade::__callStatic('isUpdateAvailab...', Array) #2 /home/loudjusf/public_html/vendor/whmcs/whmcs-foundation/lib/Admin.php(0): WHMCS\Admin->output() #3 /home/loudjusf/public_html/admin/supportannouncements.php(0): WHMCS\Admin->display() #4 {main} {"exception":"[object] (Error(code: 0): Class 'WHMCS\\Installer\\Update\\Updater' not found at /home/*****/public_html/vendor/whmcs/whmcs-foundation/lib/Application.php:0)"} [] 0 Quote Link to comment Share on other sites More sharing options...
spartanza Posted May 25, 2020 Share Posted May 25, 2020 Hi Thanks for this post. I tried both suggestions mentioned in this thread, but no success. My error is as follows: Invoices [ERROR] PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'promocount' in 'field list' in /home/userc/public_html/vendor/illuminate/database/Connection.php:462 Stack trace: #0 /home/userc/public_html/vendor/illuminate/database/Connection.php(462): PDO->prepare('update `tblhost...') #1 /home/userc/public_html/vendor/illuminate/database/Connection.php(706): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'update `tblhost...', Array) #2 /home/userc/public_html/vendor/illuminate/database/Connection.php(669): Illuminate\Database\Connection->runQueryCallback('update `tblhost...', Array, Object(Closure)) #3 /home/userc/public_html/vendor/illuminate/database/Connection.php(467): Illuminate\Database\Connection->run('update `tblhost...', Array, Object(Closure)) #4 /home/userc/public_html/vendor/illuminate/database/Connection.php(410): Illuminate\Database\Connection->affectingStatement('update `tblhost...', Array) #5 /home/userc/public_html/vendor/illuminate/database/Query/Builder.php(2071): Illuminate\Database\Connection->update('update `tblhost...', Array) #6 /home/userc/public_html/vendor/illuminate/database/Eloquent/Builder.php(531): Illuminate\Database\Query\Builder->update(Array) #7 /home/userc/public_html/vendor/illuminate/database/Eloquent/Model.php(1551): Illuminate\Database\Eloquent\Builder->update(Array) #8 /home/userc/public_html/vendor/illuminate/database/Eloquent/Model.php(1470): Illuminate\Database\Eloquent\Model->performUpdate(Object(Illuminate\Database\Eloquent\Builder), Array) #9 /home/userc/public_html/includes/processinvoices.php(0): Illuminate\Database\Eloquent\Model->save() #10 /home/userc/public_html/includes/processinvoices.php(0): getInvoiceProductPromo('299.00', 21, 81, 216) #11 /home/userc/public_html/vendor/whmcs/whmcs-foundation/lib/Cron/Task/CreateInvoices.php(0): createInvoices('', '', '', '', Object(WHMCS\Cron\Task\CreateInvoices)) #12 /home/userc/public_html/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/AbstractTask.php(0): WHMCS\Cron\Task\CreateInvoices->__invoke() #13 /home/userc/public_html/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/AbstractTask.php(0): WHMCS\Scheduling\Task\AbstractTask->execute() #14 /home/userc/public_html/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Command/AbstractCronCommand.php(0): WHMCS\Scheduling\Task\AbstractTask->run() #15 /home/userc/public_html/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Command/AbstractCronCommand.php(0): WHMCS\Cron\Console\Command\AbstractCronCommand->executeCollection(Object(WHMCS\Scheduling\Task\Collection)) #16 /home/userc/public_html/vendor/symfony/console/Command/Command.php(259): WHMCS\Cron\Console\Command\AbstractCronCommand->execute(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /home/userc/public_html/vendor/symfony/console/Application.php(844): Symfony\Component\Console\Command\Command->run(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /home/userc/public_html/vendor/symfony/console/Application.php(192): Symfony\Component\Console\Application->doRunCommand(Object(WHMCS\Cron\Console\Command\AllCommand), Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 /home/userc/public_html/vendor/symfony/console/Application.php(123): Symfony\Component\Console\Application->doRun(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #20 /home/userc/whmcsdata/crons/cron.php(0): Symfony\Component\Console\Application->run(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #21 {main} Next Illuminate\Database\QueryException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'promocount'in 'field list' (SQL: update `tblhosting` set `promoid` = 0, `updated_at` = 2020-05-25 11:29:57, `promocount` =0 where `id` = 216) in /home/userc/public_html/vendor/illuminate/database/Connection.php:713 Stack trace: #0 /home/userc/public_html/vendor/illuminate/database/Connection.php(669): Illuminate\Database\Connection->runQueryCallback('update `tblhost...', Array, Object(Closure)) #1 /home/userc/public_html/vendor/illuminate/database/Connection.php(467): Illuminate\Database\Connection->run('update `tblhost...', Array, Object(Closure)) #2 /home/userc/public_html/vendor/illuminate/database/Connection.php(410): Illuminate\Database\Connection->affectingStatement('update `tblhost...', Array) #3 /home/userc/public_html/vendor/illuminate/database/Query/Builder.php(2071): Illuminate\Database\Connection->update('update `tblhost...', Array) #4 /home/userc/public_html/vendor/illuminate/database/Eloquent/Builder.php(531): Illuminate\Database\Query\Builder->update(Array) #5 /home/userc/public_html/vendor/illuminate/database/Eloquent/Model.php(1551): Illuminate\Database\Eloquent\Builder->update(Array) #6 /home/userc/public_html/vendor/illuminate/database/Eloquent/Model.php(1470): Illuminate\Database\Eloquent\Model->performUpdate(Object(Illuminate\Database\Eloquent\Builder), Array) #7 /home/userc/public_html/includes/processinvoices.php(0): Illuminate\Database\Eloquent\Model->save() #8 /home/userc/public_html/includes/processinvoices.php(0): getInvoiceProductPromo('299.00', 21, 81, 216) #9 /home/userc/public_html/vendor/whmcs/whmcs-foundation/lib/Cron/Task/CreateInvoices.php(0): createInvoices('', '', '', '', Object(WHMCS\Cron\Task\CreateInvoices)) #10 /home/userc/public_html/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/AbstractTask.php(0): WHMCS\Cron\Task\CreateInvoices->__invoke() #11 /home/userc/public_html/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/AbstractTask.php(0): WHMCS\Scheduling\Task\AbstractTask->execute() #12 /home/userc/public_html/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Command/AbstractCronCommand.php(0): WHMCS\Scheduling\Task\AbstractTask->run() #13 /home/userc/public_html/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Command/AbstractCronCommand.php(0): WHMCS\Cron\Console\Command\AbstractCronCommand->executeCollection(Object(WHMCS\Scheduling\Task\Collection)) #14 /home/userc/public_html/vendor/symfony/console/Command/Command.php(259): WHMCS\Cron\Console\Command\AbstractCronCommand->execute(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /home/userc/public_html/vendor/symfony/console/Application.php(844): Symfony\Component\Console\Command\Command->run(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /home/userc/public_html/vendor/symfony/console/Application.php(192): Symfony\Component\Console\Application->doRunCommand(Object(WHMCS\Cron\Console\Command\AllCommand), Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /home/userc/public_html/vendor/symfony/console/Application.php(123): Symfony\Component\Console\Application->doRun(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /home/userc/whmcsdata/crons/cron.php(0): Symfony\Component\Console\Application->run(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Any help will be greatly appreciated 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 25, 2020 Share Posted May 25, 2020 26 minutes ago, spartanza said: Thanks for this post. I tried both suggestions mentioned in this thread, but no success. you tried the SQL query above? because that error is saying that the column still doesn't exist in tblhosting. 0 Quote Link to comment Share on other sites More sharing options...
spartanza Posted May 25, 2020 Share Posted May 25, 2020 Ahah! Sorry. I just ran it and it works 100% now. I ran alter table `tblhosting` add `promocount` INT(10) NULL DEFAULT '0' AFTER `promoid` Thank you. 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.