cangage Posted March 13, 2019 Share Posted March 13, 2019 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 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 14, 2019 Share Posted March 14, 2019 have you created any custom sidebars yourself using hooks ? are you using a commercial custom template, a variation of "Six" or a clean unaltered version of "Six" ?? 0 Quote Link to comment Share on other sites More sharing options...
souzadavi Posted April 3 Share Posted April 3 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 0 Quote Link to comment Share on other sites More sharing options...
leemahoney3 Posted April 3 Share Posted April 3 What page are you visiting when you see that error? Which date is set to 0000-00-00 on the domain? 0 Quote Link to comment Share on other sites More sharing options...
souzadavi Posted April 3 Share Posted April 3 I found it on WHMCS manual https://help.whmcs.com/m/installation/l/678317-disabling-mysql-strict-mode 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.