Jump to content
artaweb

Column not found: 1054 Unknown column 'usedhook'

Recommended Posts

Hello,

We upgraded to version 8 (latest version) about a month ago.

Apparently since then everyone signed up had this issue registering. 

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'usedhook' in 'field list' in /home/crmseven/public_html/vendor/illuminate/database/Connection.php:48

Now, when user registers, their account gets created but they land on the error page, if they enter the url manually, it takes them to client area. But this error is being produced every time someone registers a new account. 

I've read about this issue on this forums but didn't find anything about "usedhook" issue. 

Please advice

 

Edited by artaweb

Share this post


Link to post
Share on other sites

I would suggest checking the includes/hooks folder for a hook that could cause this... or perhaps an addon module... usedhook doesn't ring any bells with me.

Share this post


Link to post
Share on other sites

This is the full error, apparently its something with the security question

Next Illuminate\Database\QueryException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'usedhook' in 'field list' (SQL: update `tblusers` set `usedhook` = Login, `userid` = 17807, `security_question_id` = 1, `security_question_answer` = PWyQHJ3GNahoExBZoESppWUngBb9DwfhCj/ITFM=, `tblusers`.`updated_at` = 2021-02-06 15:56:32 where `id` = 17807) in /home/username/public_html/vendor/illuminate/database/Connection.php:67

 

Stack trace:
#0 /home/username/public_html/vendor/illuminate/database/Connection.php(631): Illuminate\Database\Connection->runQueryCallback('update `tbluser...', Array, Object(Closure))
#1 /home/username/public_html/vendor/illuminate/database/Connection.php(496): Illuminate\Database\Connection->run('update `tbluser...', Array, Object(Closure))
#2 /home/username/public_html/vendor/illuminate/database/Connection.php(429): Illuminate\Database\Connection->affectingStatement('update `tbluser...', Array)
#3 /home/username/public_html/vendor/illuminate/database/Query/Builder.php(2802): Illuminate\Database\Connection->update('update `tbluser...', Array)
#4 /home/username/public_html/vendor/illuminate/database/Eloquent/Builder.php(792): Illuminate\Database\Query\Builder->update(Array)
#5 /home/username/public_html/vendor/illuminate/database/Eloquent/Model.php(806): Illuminate\Database\Eloquent\Builder->update(Array)
#6 /home/username/public_html/vendor/illuminate/database/Eloquent/Model.php(721): Illuminate\Database\Eloquent\Model->performUpdate(Object(Illuminate\Database\Eloquent\Builder))
#7 /home/username/public_html/vendor/whmcs/whmcs-foundation/lib/User/Traits/SecurityQuestions.php(0): Illuminate\Database\Eloquent\Model->save()
#8 /home/username/public_html/register.php(0): WHMCS\User\User->setSecurityQuestion('1', 'sdfsdfsdf')
#9 {main}

 

Share this post


Link to post
Share on other sites

I figured it was caused by the module clientverification. What I noticed is most of the modules provided by whmcsservices/com are poorly coded. Yesterday removed all their modules.

Share this post


Link to post
Share on other sites
9 hours ago, artaweb said:

I figured it was caused by the module clientverification. What I noticed is most of the modules provided by whmcsservices/com are poorly coded. Yesterday removed all their modules.

For this issue, I must defend whmcsservices. It was some time ago and I can't remember the details, but I also had the "usedhooks" problem with a module of my own. WHMCS v8 has changed something - presumably it's a bug - which under certain circumstances tries to write to the tblusers.usedhooks column, even though this isn't defined in any way. 

Even though I'm pretty sure it's a bug in WHMCS, I didn't bother to report this to WHMCS as the problem 1.) will not be solved for older versions anyway and 2.) it will probably take a long time before a fix appears. Instead I solved the problem via workaround, which took quite some of my time...

Share this post


Link to post
Share on other sites

Defend what exactly?

When they declare their module as "Compatible" with version 8+, then this means they've tested and verified its functionality.

I remember it was just a year ago, their domain name expired and the entire licensing system went down which cause all our whmcs instances go down as well. 

What I learned during years working with whmcs, spend money on real developers to have open source code. Also, prevent adding too many module to prevent incompatibilities issues in the future. 

Share this post


Link to post
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