Jump to content

Ooops Page


Recommended Posts

We have a custom WHMCS page that is meant for clients once they are logged in. 

When a client goes directly to this page (not logged in) instead of showing a log in form, it says Oops Something went wrong and we couldn't process your request.. 

How do I fix this page to show a log in form and then redirect the user to their original page once they are logged in?

Link to comment
Share on other sites

An oops page is usually a PHP error happening and so you would need to turn on debugging (General settings -> Other -> Display Errors) and fix the php error.  You're likely trying to access an object that isn't there and that causing an exception to happen.   Unless you really need to keep them on that custom page, I would suggest checking if they are logged in and if not doing a redirect via a header("location: login.php") call to redirect to the login page.  Then after login if you need them back on that custom page, use a hook to send them there.  Using a session variable and checking in that hook for that variable would be enough to see if sending to the custom page is needed. 

Link to comment
Share on other sites

3 minutes ago, steven99 said:

An oops page is usually a PHP error happening and so you would need to turn on debugging (General settings -> Other -> Display Errors) and fix the php error.  You're likely trying to access an object that isn't there and that causing an exception to happen.   Unless you really need to keep them on that custom page, I would suggest checking if they are logged in and if not doing a redirect via a header("location: login.php") call to redirect to the login page.  Then after login if you need them back on that custom page, use a hook to send them there.  Using a session variable and checking in that hook for that variable would be enough to see if sending to the custom page is needed. 

Right on....This is it:

Error: Call to undefined function WHMCS\CALinkUpdateCC() in whmcs/whmcs-foundation/lib/ClientArea.php:0
Stack trace:

How can I fix that?

Link to comment
Share on other sites

18 minutes ago, TaskHusky said:

Right on....This is it:

Error: Call to undefined function WHMCS\CALinkUpdateCC() in whmcs/whmcs-foundation/lib/ClientArea.php:0
Stack trace:

How can I fix that?

What version of WHMCS are you using?  From searches, that appears to be an issue after upgrading to 7.8 (probably 8.x also) and applying the hotfix at

 may help with that error for at least 7.8 .    

Link to comment
Share on other sites

1 minute ago, steven99 said:

What version of WHMCS are you using?  From searches, that appears to be an issue after upgrading to 7.8 (probably 8.x also) and applying the hotfix at

 may help with that error for at least 7.8 .    

Running 7.7.1

 

7 minutes ago, string said:

https://developers.whmcs.com/advanced/creating-pages/

If you add this to your custom page, the page should show a login page to guests, instead of the error message:.


$ca->requireLogin();

 

This is already in the code. That is why I'm surprised it is broke.

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