Jump to content

$template->tpl_vars stopped working in WHMCS 8.1.3


sonuyos

Recommended Posts

So i updated WHMCS to latest this week, waited long enough for all the issues to iron out.

 

but now i am facing this issue.

 

I have a custom script that uses variables which is passed on the client area by template.

 

"$template->tpl_vars"

 

and to be able to use this, i had added a code in configuration.php

 

$smarty_security_policy = array(
    'system' => array(
        'disabled_tags' => [],
        'enabled_special_smarty_vars' => array(
            'template_object',
        ),
    ),
);

However in latest update, if i have this added, the site does not work, throws random error like

 

Smarty Error: Syntax error in template "file:/home/USER/public_html/billing/templates/orderforms/standard_cart_twenty_one_point_oh/checkout.tpl" on line 53 "<form method="post" action="{$smarty.server.PHP_SELF}?a=checkout" name="orderfrm" id="frmCheckout">" special variable '$smarty.server' not allowed by security setting

How can i make sure that both, the WHMCS and the custom script works here?

Link to comment
Share on other sites

3 hours ago, sonuyos said:

So i updated WHMCS to latest this week, waited long enough for all the issues to iron out.

you think so?

3 hours ago, sonuyos said:

How can i make sure that both, the WHMCS and the custom script works here?

you could add 'server' to the list of smarty variables in your configuration file...

'template_object','server',
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