Jump to content

Template error after Upgrading


knoppers

Recommended Posts

Hello guys,

today I updated our WHMCS to version 7.7. The update went so far without problems. However, I can no longer view the customer frontend and only get the following error message:

Oops!
Something went wrong and we couldn't process your request.

Please go back to the previous page and try again.



Error: Call to a member function getButtonClass() on string in /var/www/clients/client0/web4/web/templates_c/61ae1786e7b43f3127b5f6a8406143ec1643f9f2_0.file.header.tpl.php:232
Stack trace:
#0 /var/www/clients/client0/web4/web/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_5c58448c944e49_13491300(Object(Smarty_Internal_Template))
#1 /var/www/clients/client0/web4/web/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#2 /var/www/clients/client0/web4/web/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#3 /var/www/clients/client0/web4/web/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render(false, 0)
#4 /var/www/clients/client0/web4/web/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 0)
#5 /var/www/clients/client0/web4/web/vendor/whmcs/whmcs-foundation/lib/Smarty.php(0): Smarty_Internal_TemplateBas
e->fetch('byte/h...', NULL, NULL, NULL, false, true, false)
#6 /var/www/clients/client0/web4/web/vendor/whmcs/whmcs-foundation/lib/ClientArea.php(0): WHMCS\Smarty->fetch('byte/h...')
#7 /var/www/clients/client0/web4/web/vendor/whmcs/whmcs-foundation/lib/ClientArea.php(0): WHMCS\ClientArea->outputWithoutExit()
#8 /var/www/clients/client0/web4/web/vendor/whmcs/whmcs-foundation/lib/Http/Message/AbstractViewableResponse.php(0): WHMCS\ClientArea->getOutputContent()
#9 /var/www/clients/client0/web4/web/vendor/middlewares/utils/src/CallableHandler.php(39): WHMCS\Http\Message\AbstractViewableResponse->getBody()
#10 /var/www/clients/client0/web4/web/vendor/middlewares/fast-route/src/FastRoute.php(96): Middlewares\Utils\CallableHandler::execute(Array, Array)
#11 /var/www/clients/client0/web4/web/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/HandleProcessor.php(0): Middlewares\FastRoute->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#12 /var/www/clients/client0/web4/web/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\HandleProcessor->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#13 /var/www/clients/client0/web4/web/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\HandleProcessor->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#14 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#15 /var/www/clients/client0/web4/web/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#16 /var/www/clients/client0/web4/web/vendor/middlewares/utils/src/Dispatcher.php(56): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#17 /var/www/clients/client0/web4/web/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/BackendDispatch.php(0): Middlewares\Utils\Dispatcher->dispatch(Object(WHMCS\Http\Message\ServerRequest))
#18 /var/www/clients/client0/web4/web/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\BackendDispatch->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#19 /var/www/clients/client0/web4/web/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\BackendDispatch->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#20 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#21 /var/www/clients/client0/web4/web/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#22 /var/www/clients/client0/web4/web/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutePathMatch.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#23 /var/www/clients/client0/web4/web/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutePathMatch->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#24 /var/www/clients/client0/web4/web/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutePathMatch->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#25 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#26 /var/www/clients/client0/web4/web/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#27 /var/www/clients/client0/web4/web/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/WhitelistFilter.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#28 /var/www/clients/client0/web4/web/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/DelegatingMiddlewareTrait.php(0): WHMCS\Route\Middleware\WhitelistFilter->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#29 /var/www/clients/client0/web4/web/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\WhitelistFilter->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#30 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#31 /var/www/clients/client0/web4/web/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#32 /var/www/clients/client0/web4/web/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableClientModuleRequest.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#33 /var/www/clients/client0/web4/web/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableClientModuleRequest->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#34 /var/www/clients/client0/web4/web/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableClientModuleRequest->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#35 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#36 /var/www/clients/client0/web4/web/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#37 /var/www/clients/client0/web4/web/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableAdminRequestUri.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#38 /var/www/clients/client0/web4/web/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableAdminRequestUri->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#39 /var/www/clients/client0/web4/web/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableAdminRequestUri->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#40 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#41 /var/www/clients/client0/web4/web/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#42 /var/www/clients/client0/web4/web/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableRequestUri.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#43 /var/www/clients/client0/web4/web/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableRequestUri->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#44 /var/www/clients/client0/web4/web/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableRequestUri->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#45 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#46 /var/www/clients/client0/web4/web/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#47 /var/www/clients/client0/web4/web/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableRequestQueryUri.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#48 /var/www/clients/client0/web4/web/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableRequestQueryUri->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#49 /var/www/clients/client0/web4/web/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableRequestQueryUri->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#50 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#51 /var/www/clients/client0/web4/web/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#52 /var/www/clients/client0/web4/web/vendor/middlewares/utils/src/Dispatcher.php(56): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#53 /var/www/clients/client0/web4/web/index.php(0): Middlewares\Utils\Dispatcher->dispatch(Object(WHMCS\Http\Message\ServerRequest))
#54 {main}

 

I deleted the template cache, optimized databases, uploaded all files and overwrote them with the original ones, changed the template to SIX, but didn't get a problem solution.
Can anyone give me a hint?

 

Greetings

 

Link to comment
Share on other sites

I have seen this error once so far. It was due to the Facebook Javascript code, wrapping the <script> part of the code in {literal} {/literal} tags fixed the issue.

Seeing as you have tested Six and it has the same issue this may not be the cause in your situation unless you are using a custom module which imports Javascript, for example a live chat module?

Link to comment
Share on other sites

Hello,


I have not integrated any other plugins or Javascript applications/code. Only the Internetx module is a domain registrar.
If I look into the cache file in line 30 (as in the error) the following entry can be found:

 

<span class="input-group-btn">
<?php if ($_smarty_tpl->tpl_vars['registerdomainenabled']->value) {?>
---THIS IS THE LINE---- <input type="submit" class="btn search<?php echo $_smarty_tpl->tpl_vars['captcha']->value->getButtonClass($_smarty_tpl->tpl_vars['captchaForm']->value);?> ---THIS IS THE LINE END---- 
" value="<?php echo $_smarty_tpl->tpl_vars['LANG']->value['search'];?>
" />

Disable the Captcha Option doesn't work also.

I just can't understand it.

Link to comment
Share on other sites

  • 2 weeks later...
On 2/16/2019 at 4:06 AM, knoppers said:

Hey,

no, unfortunately, I couldn't solve the problem.
I have nothing left but a rollback to 7.5.


Do you have the same problem?

Greetings

all tables set to utf8_unicode_ci;

This guide addresses the problem with some examples: https://help.whmcs.com/m/85428/l/797626-troubleshooting-a-blank-admin-dashboard-after-update

examplr 1 table

ALTER TABLE tblorders CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;

 

Link to comment
Share on other sites

On 2/5/2019 at 10:17 AM, knoppers said:

Hello,


I have not integrated any other plugins or Javascript applications/code. Only the Internetx module is a domain registrar.
If I look into the cache file in line 30 (as in the error) the following entry can be found:

 


<span class="input-group-btn">
<?php if ($_smarty_tpl->tpl_vars['registerdomainenabled']->value) {?>
---THIS IS THE LINE---- <input type="submit" class="btn search<?php echo $_smarty_tpl->tpl_vars['captcha']->value->getButtonClass($_smarty_tpl->tpl_vars['captchaForm']->value);?> ---THIS IS THE LINE END---- 
" value="<?php echo $_smarty_tpl->tpl_vars['LANG']->value['search'];?>
" />

Disable the Captcha Option doesn't work also.

I just can't understand it.

@knoppers

 

Is this on a .tpl file?

IF so, you will need to make sure php smarty tags are enabled with WHMCS, and instead of the <?php it goes as follows...

<span class="input-group-btn">
{php} if ($_smarty_tpl->tpl_vars['registerdomainenabled']->value) { {/php}
---THIS IS THE LINE---- <input type="submit" class="btn search{php} echo $_smarty_tpl->tpl_vars['captcha']->value->getButtonClass($_smarty_tpl->tpl_vars['captchaForm']->value);{/php} ---THIS IS THE LINE END---- 
" value="{php} echo $_smarty_tpl->tpl_vars['LANG']->value['search'];{/php}
" />

Let me know if that helps. This will be the solution if the page you're putting this on is smarty.

Also, I want to point out where you have the opening bracket on your first line, make sure when you are done with that segement you do {php} } {/php} if in smarty.. and if this isn't in smarty, you'll still need the <?php } ?> to close that section off. 

Link to comment
Share on other sites

I have same problem but only in domain register and transfer page. I am using default template six and orderform standard cart.

Smarty php is enabled.     

Error: Call to a member function getButtonClass() on string in /home/username/whmcs-data/templates_c/f77c12c517430aa77542683587a376d15e9e3ad2_0.file.domainregister.tpl.php:73
Stack trace:
#0 /home/username/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_5c69dd3fafed77_98849531(Object(Smarty_Internal_Template))
#1 /home/username/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#2 /home/username/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#3 /home/username/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render(false, 0)
#4 /home/username/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 0)
#5/home/username/public_html/vendor/whmcs/whmcs-foundation/lib/Smarty.php(0): Smarty_Internal_TemplateBase->fetch('/home/username...', NULL, NULL, NULL, false, true, false)
#6 /home/username/public_html/includes/clientareafunctions.php(0): WHMCS\Smarty->fetch('/home/username...')
#7 /home/username/public_html/cart.php(0): outputClientArea('domainregister', false, Array)
#8 {main}

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