jcn50 Posted September 29, 2020 Share Posted September 29, 2020 Hi Guys, I had this error after the upgrade to WHMCS v8.0.0.r1: [29-Sep-2020 09:54:12 UTC] [WHMCS Application] ERROR: TypeError: Argument 1 passed to Carbon\CarbonInterval::setLocalTranslator() must implement interface Symfony\Component\Translation\TranslatorInterface, instance of Carbon\Translator given, called in /public_html/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php on line 778 and defined in /public_html/vendor/nesbot/carbon/src/Carbon/Traits/Localization.php:168 Stack trace: #0 /public_html/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php(778): Carbon\CarbonInterval->setLocalTranslator(Object(Carbon\Translator)) #1 /public_html/modules/widgets/Support.php(46): Carbon\Carbon->diffForHumans() #2 /public_html/vendor/whmcs/whmcs-foundation/lib/Module/AbstractWidget.php(0): WHMCS\Module\Widget\Support->generateOutput(Array) I had to comment out lines [777-779] of this file: /vendor/nesbot/carbon/src/Carbon/Traits/Difference.php for the admin to work! 0 Quote Link to comment Share on other sites More sharing options...
jcn50 Posted September 29, 2020 Author Share Posted September 29, 2020 Upgrading to PHP v7.4 fixed it all! Yay~~ 0 Quote Link to comment Share on other sites More sharing options...
jcn50 Posted September 29, 2020 Author Share Posted September 29, 2020 ~I talked too fast: the error is still there and only showing when logging in as an admin~ 😯 0 Quote Link to comment Share on other sites More sharing options...
jcn50 Posted October 5, 2020 Author Share Posted October 5, 2020 Any help? 😞 0 Quote Link to comment Share on other sites More sharing options...
jcn50 Posted October 5, 2020 Author Share Posted October 5, 2020 Upgrading to v8.0.1.r1 did not change anything 😞 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 5, 2020 Share Posted October 5, 2020 1 minute ago, jcn50 said: Upgrading to v8.0.1.r1 did not change anything 😞 I was just about to suggest doing that. 🙂 ideally for an issue like this, you should have posted in the v8 forums as that will be more likely to be seen, and responded to, by WHMCS staff... opening a ticket with Support would be another option - they may be aware whether this is a known bug or not..... if you get your license directly from WHMCS (login required) - https://www.whmcs.com/support/ if you get your license from a reseller / host (no login required) - https://www.whmcs.com/reseller-support/ it's possible that the initial v8 upgrade didn't complete correctly and there are missing files - and an incremental patch update, or maybe even the automatic updter, might not be able to fix. getting hold of the v8.0.1 full zip and reuploading the vendor folder from it might be worth a go to see if that fixes it. 0 Quote Link to comment Share on other sites More sharing options...
PV-Patrick Posted October 6, 2020 Share Posted October 6, 2020 I am experiencing the same issue, did you get it work? @jcn50 0 Quote Link to comment Share on other sites More sharing options...
jcn50 Posted October 7, 2020 Author Share Posted October 7, 2020 On 10/5/2020 at 2:00 PM, brian! said: ideally for an issue like this, you should have posted in the v8 forums as that will be more likely to be seen, and responded to, by WHMCS staff... Oh sorry, I was not sure were to post~ if you want or if a mod comes around: this thread can be moved. 14 hours ago, PV-Patrick said: I am experiencing the same issue, did you get it work? I had to comment out the lines of that PHP script (see my previous post). That error is only triggered when logging in as an admin. I am not sure if it is linked with the theme/template that I have. On 10/5/2020 at 2:00 PM, brian! said: it's possible that the initial v8 upgrade didn't complete correctly and there are missing files - and an incremental patch update, or maybe even the automatic updter, might not be able to fix. The error does not suggest that, it seems to be a variable type mistake in the code (see below). On 10/5/2020 at 2:00 PM, brian! said: getting hold of the v8.0.1 full zip and reuploading the vendor folder from it might be worth a go to see if that fixes it. I have just done this and it didn't work~ so I think it is a real bug. => Finally I have upgraded to version 8.0.2.r1 and it's the same. I have decided to email directly Brian Nesbitt whom seem to be the code maintainer of that script. I will revert here if I hear from him. 0 Quote Link to comment Share on other sites More sharing options...
jcn50 Posted October 7, 2020 Author Share Posted October 7, 2020 (edited) I have updated composer and added nesbot: composer require nesbot/carbon However now I am getting this error, meh: PHP Fatal error: Uncaught Error: Class 'WHMCS\Utility\ErrorManagement' not found in init.php:0 But the file ErrorManagement.php file exists in /vendor/whmcs/whmcs-foundation/lib/Utility/ and all the files are correctly 8.0.2.r1... Edited October 7, 2020 by jcn50 0 Quote Link to comment Share on other sites More sharing options...
jcn50 Posted October 7, 2020 Author Share Posted October 7, 2020 (edited) OK, I have manually re-uploaded v8.0.2r1 ZIP (minus the install folder) and it is working again WITHOUT that initial error! (yay). I hope this helps someone~ Edited October 7, 2020 by jcn50 0 Quote Link to comment Share on other sites More sharing options...
jcn50 Posted October 7, 2020 Author Share Posted October 7, 2020 I had something else that needed an upgrade: I had a POP3 cron set-up in the parent directory (../whmcsdata/crons/) and those scripts were not upgraded at all. You might want to double check those scripts when upgrading to v8! 0 Quote Link to comment Share on other sites More sharing options...
PV-Patrick Posted October 8, 2020 Share Posted October 8, 2020 On 10/7/2020 at 5:30 AM, jcn50 said: OK, I have manually re-uploaded v8.0.2r1 ZIP (minus the install folder) and it is working again WITHOUT that initial error! (yay). I hope this helps someone~ Thank you so much @jcn50 for the help! I'll give this a try tonight and see if it works. I also have a support ticket in with WHMCS but not sure how helpful that will be. 0 Quote Link to comment Share on other sites More sharing options...
agarzon Posted October 8, 2020 Share Posted October 8, 2020 (edited) I'm having the same issue right now, luckly on my "dev" copy. Linux, PHP 7.4, WHMCS 8.02. (the same docker container I've been using for years) I did reupload all from .zip, still having the same error. Edited October 8, 2020 by agarzon 0 Quote Link to comment Share on other sites More sharing options...
PV-Patrick Posted October 10, 2020 Share Posted October 10, 2020 @jcn50 @agarzon Received this reply from WHMCS support and it worked for me. During the update to WHMCS 8 a number of files are deleted from the installation. However, if these fail due to permission issues certain files left over could cause issues. This particular issue you experienced appears to be caused by the following file not being able to be deleted: /vendor/symfony/translation/TranslatorInterface.php Therefore if you experience the issue after upgrade removing that file should solve the problem. 2 Quote Link to comment Share on other sites More sharing options...
agarzon Posted October 10, 2020 Share Posted October 10, 2020 10 hours ago, PV-Patrick said: @jcn50 @agarzon Received this reply from WHMCS support and it worked for me. During the update to WHMCS 8 a number of files are deleted from the installation. However, if these fail due to permission issues certain files left over could cause issues. This particular issue you experienced appears to be caused by the following file not being able to be deleted: /vendor/symfony/translation/TranslatorInterface.php Therefore if you experience the issue after upgrade removing that file should solve the problem. I had to reinstall from scrath everything again and import sql backup. Was the only way to fix it after trying all kind of solutions including to reupload all the files from the whmcs_v802_full.zip 0 Quote Link to comment Share on other sites More sharing options...
Enescan Posted June 27, 2023 Share Posted June 27, 2023 (edited) @PV-Patrick Thanks man. Problem solved for me. Edited June 27, 2023 by Enescan 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.