Jump to content

Client Area "Domains" Exception


Recommended Posts

A client of ours is having an issue managing his domain on the client page: https://<domainofcompany>/hosting/clientarea.php?action=domains 

He get's one of the pages that gives you the oops error: 

Oops!
Something went wrong and we couldn't process your request.
Please go back to the previous page and try again.

I've enabled the display errors and when I load the page, it gives the following stack trace:
 

exception 'Whoops\Exception\ErrorException' with message 'Call to a member function diffInDays() on null' in /var/www/html/hosting/vendor/whmcs/whmcs-foundation/lib/View/Client/Menu/PrimarySidebarFactory.php:0
Stack trace:
#0 /var/www/html/hosting/vendor/whmcs/whmcs-foundation/lib/Utility/Error/Run.php(0): WHMCS\Utility\Error\Run->handleError(1, 'Call to a membe...', '/var/www/html/h...', 0)
#1 [internal function]: WHMCS\Utility\Error\Run->handleShutdown()
#2 {main}

This only happens to a couple of clients. A vast majority can load the Domains page from the Client Area and see their domain information.

WHMCS Version: 7.7.0

PHP Version: 5.6.39

Link to comment
Share on other sites

  • 5 years later...

This is happening here too.

In MySQL, the value '0000-00-00' is not considered a valid date for fields of type DATE. By default, MySQL is configured to reject invalid dates such as '0000-00-00', unless you alter the strict date validation mode.

The MySQL do not allow save date as 0000-00-00 so it save as NULL, on tbldomain the expirydate it's saving with NULL and not 0000-00-00. You can use:

SET sql_mode = 'ALLOW_INVALID_DATES';

 

So any user who has pending domain when try to access the client area get the follow error:

Oops!
Something went wrong and we couldn't process your request.
Please go back to the previous page and try again.
For additional assistance, please reference the WHMCS TroubleShooting Guide »
Error: Call to a member function diffInDays() on null in /public_html/vendor/whmcs/whmcs-foundation/lib/View/Client/Menu/PrimarySidebarFactory.php:0
Stack trace:
#0 /public_html/vendor/whmcs/whmcs-foundation/lib/View/Client/Menu/MenuRepository.php(0): WHMCS\View\Client\Menu\PrimarySidebarFactory->domainList()
#1 /public_html/vendor/whmcs/whmcs-foundation/lib/View/Client/Menu/MenuRepository.php(0): WHMCS\View\Client\Menu\MenuRepository->buildSidebar()
#2 /public_html/vendor/illuminate/support/Facades/Facade.php(261): WHMCS\View\Client\Menu\MenuRepository->primarySidebar()
#3 /public_html/clientarea.php(0): Illuminate\Support\Facades\Facade::__callStatic()
#4 {main}

This happen because on WHMCS\View\Menu\MenuFactory on PrimarySidebarFactory Expects column expiryDate to be a carbon instance. Actually returns null value and cannot call function diffInDays.

The easy way is to check if the value on collumn expiryDate is a carbon instance.

 

Any help from WHMCS team will be appreciated!

Thanks

 

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