Jump to content
WizTech

smarty problems after upgrading

Recommended Posts

I went to support immediately when this happened because it's a repeat of earlier this year. I have a branded six template with few custom changes. The first time it was determined that the template had stored something in the database that upgrading doesn't change and support was able to tell me exactly where to look. This time they brushed me off twice and told me to switch to the default six instead. Uh, folks, branding is important and I have no desire to totally redo the whole thing - messaging and all.  Last March I pushed all six files to my custom template which did not fix that problem.  So how in the h... do I figure out where the problem is? The php error is

Error: Call to a member function count() on null in /home/venturz/templates_c/461a4f0b9784adbd968506a18ac384135df7980e_0.file.viewcart.tpl.php:1098
Stack trace:
#0 /home/xxxxxx/public_html/hosting/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_5d6962c4639995_38520545(Object(Smarty_Internal_Template))
#1 /home/xxxxxx/public_html/hosting/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#2 /home/xxxxx/public_html/hosting/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#3 /home/xxxxx/public_html/hosting/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render(false, 0)
#4 /home/xxxxx/public_html/hosting/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 0)
#5 /home/xxxxx/public_html/hosting/vendor/whmcs/whmcs-foundation/lib/Smarty.php(0): Smarty_Internal_TemplateBase->fetch('/home/venturz/p...', NULL, NULL, NULL, false, true, false)
#6 /home/xxxxx/public_html/hosting/includes/clientareafunctions.php(0): WHMCS\Smarty->fetch('/home/venturz/p...')
#7 /home/xxxxx/public_html/hosting/cart.php(0): outputClientArea('viewcart', false, Array)
#8 {main}

Does this mean that the viewcart.tpl.php  is the issue?

Share this post


Link to post
Share on other sites
12 minutes ago, WizTech said:

The first time it was determined that the template had stored something in the database that upgrading doesn't change and support was able to tell me exactly where to look.

what did Support tell you to do the first time?

17 minutes ago, WizTech said:

Uh, folks, branding is important and I have no desire to totally redo the whole thing - messaging and all. 

how much customisation have to you do the templates? and are all the changes in the template, or are there hooks involved as well ??

24 minutes ago, WizTech said:

So how in the h... do I figure out where the problem is? Does this mean that the viewcart.tpl.php  is the issue?

looking at your site, it fails with Modern (and generates the above error when using your theme or Six), but works fine with Standard Cart (and your theme)...

two thoughts...

  1. which version of WHMCS is this - v7.8 or v7.8.1 ? I know v7.8.1 mentions the following in the changelogs..
    Quote

    CORE-13681 - Prevent error for undefined variable in Boxes & Modern carts

    so if you're on v7.8, upgrading to v7.8.1 might fix this (if it's the same error).

  2. in Modern, it seemingly crashes at viewcart, but using SC, it goes to configuredomains first and not straight to viewcart... i'm not seeing any obvious differences between your Modern viewcart template and the clean version of the template.

you probably already know this, but Modern was deprecated years ago and doesn't really get updated - the odd tweak to make sure it basically works, but new features available in SC aren't added to Modern... so at some point, you're going to have to switch to standard_cart (or one of the other newer options) as Modern won't continue to work indefinitely.

Share this post


Link to post
Share on other sites

Thanks for the explanation. I really prefer the Modern for my business and in fact have just given up my server. I use this as my primary invoicing program for my all clients. The hosting was always a small amount of this. Just managed to wipe out my saved correct password for whmcs so got to get back in to go further. Thanks so very much for your complete answer!

I did just upgrade to 7.8 as prompted. Now I see other problems. I have always hated WHCMS for the upgrades and now the easier one-click ones are still a problem. Way too much work but kinda stuck in it now. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated