nagy00 Posted November 20, 2020 Share Posted November 20, 2020 Hello ,my whmcs version is 7.5.1 with php version 7.4.12 and i have this error for any one go to cart : Error: Call to a member function toPrefixed() on null in /home/ninjahost/public_html/templates_c/e448c6c0e39998a23297e953fd712c1bf8ed6315_0.file.viewcart.tpl.php:477 Stack trace: #0 /home/ninjahost/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(122): content_5fb7b40495aa87_03553889() #1 /home/ninjahost/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(199): Smarty_Template_Resource_Base->getRenderedTemplateCode() #2 /home/ninjahost/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(159): Smarty_Template_Compiled->render() #3 /home/ninjahost/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(191): Smarty_Internal_Template->render() #4 /home/ninjahost/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(94): Smarty_Internal_TemplateBase->_execute() #5 /home/ninjahost/public_html/vendor/whmcs/whmcs-foundation/lib/Smarty.php(0): Smarty_Internal_TemplateBase->fetch() #6 /home/ninjahost/public_html/includes/clientareafunctions.php(0): WHMCS\Smarty->fetch() #7 /home/ninjahost/public_html/cart.php(0): outputClientArea() #8 {main} screenshot of error attached 0 Quote Link to comment Share on other sites More sharing options...
nagy00 Posted November 21, 2020 Author Share Posted November 21, 2020 Any help please 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 21, 2020 Share Posted November 21, 2020 On 20/11/2020 at 12:29, nagy00 said: Hello ,my whmcs version is 7.5.1 with php version 7.4.12 and i have this error for any one go to cart : I don't think v7.5 would support PHP 7.4 as it wouldn't have existed when v7.5 was developed and released - try dropping the PHP version down to PHP 7.2 or 7.3, or if you need to use PHP 7.4, then you might need to use v8 or later. 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted November 21, 2020 Share Posted November 21, 2020 Would agree with @brian! , though looking at the error it seems the view cart template has PHP in it that is trying to access an object but that object has not been initialized . Are you using a custom orderform? 0 Quote Link to comment Share on other sites More sharing options...
nagy00 Posted November 22, 2020 Author Share Posted November 22, 2020 12 hours ago, brian! said: I don't think v7.5 would support PHP 7.4 as it wouldn't have existed when v7.5 was developed and released - try dropping the PHP version down to PHP 7.2 or 7.3, or if you need to use PHP 7.4, then you might need to use v8 or later. Hello , i tried all PHP versions from 5.6 to 7.4 even 7.2 and 7.3 give me the same error , i really don't know how i can fix this because this is very bad problem for me and my work any solutions please ? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 23, 2020 Share Posted November 23, 2020 On 22/11/2020 at 05:48, nagy00 said: i really don't know how i can fix this because this is very bad problem for me and my work any solutions please ? have you made any changes to the templates ? specifically viewcart.tpl ?? if so, what happens when you use a clean (unaltered) version of Six and standard_cart ?? 0 Quote Link to comment Share on other sites More sharing options...
nagy00 Posted November 28, 2020 Author Share Posted November 28, 2020 On 11/23/2020 at 2:56 PM, brian! said: have you made any changes to the templates ? specifically viewcart.tpl ?? if so, what happens when you use a clean (unaltered) version of Six and standard_cart ?? I didnt made any changes on viewcart.tpl , and i dont know how to use standard_cart can you tell me how please 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 28, 2020 Share Posted November 28, 2020 8 hours ago, nagy00 said: I didnt made any changes on viewcart.tpl , and i dont know how to use standard_cart can you tell me how please then you are using a custom theme and/or custom orderform template ? the point is not so much whether you've made any changes to the template since updating, its whether those templates where updated before updating (e.g they're custom). and if you wanted to templorarily view your cart using Six & SC, and didn't want to make changes to your WHMCS configuration, then you can pass the system template and orderform in the URL. https://docs.whmcs.com/Linking_to_WHMCS#Setting_the_Language_or_Template_via_the_URL http://example.com/whmcs/cart.php?systpl=six&carttpl=standard_cart 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.