Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Method is deprecated error Twig Template

Discussion in 'General Discussion' started by oemi, Mar 31, 2019.

  1. oemi

    oemi Registered

    Joined:
    Mar 31, 2019
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    South Africa
    cPanel Access Level:
    Website Owner
    Hello.
    I am a https website owner. I designed and published my own web site using Dreamweaver.
    I have a hosting package with a hosting provider. The version of cPanel supplied for my use by the hosting provider is v72.0.10. Some weeks ago after doing the usual virus scan in cpanel I noticed a TWIG folder appear that wasn't there before. The TWIG folder contains over 30 different folder which all contain script entries - which I do not understand the meaning of. I asked my host provider to tell me what is the purpose and function of this TWIG file and folders and they said ask cPanel because they did not put it in my cPanel File manager.

    I have posted below a sample of one of the TWIG folder files contents.

    Someone please be kind and tell me what this TWIG issue is:

    <?php /* server/plugins/section_links.twig */ class __TwigTemplate_12c931d4b55a70e1362368b19d95810508431e4e2a46e8666a556281efcf0b7f extends Twig_Template { public function __construct(Twig_Environment $env) { parent::__construct($env); $this->parent = false; $this->blocks = array( ); } protected function doDisplay(array $context, array $blocks = array()) { // line 1 echo "<div id=\"sectionlinks\"> "; // line 2 $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable(twig_get_array_keys_filter(($context["plugins"] ?? null))); foreach ($context['_seq'] as $context["_key"] => $context["plugin_type"]) { // line 3 echo " <a href=\"#plugins-"; echo twig_escape_filter($this->env, preg_replace("/[^a-z]/", "", twig_lower_filter($this->env, $context["plugin_type"])), "html", null, true); echo "\"> "; // line 4 echo twig_escape_filter($this->env, $context["plugin_type"], "html", null, true); echo " </a> "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['plugin_type'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 7 echo "</div> "; } public function getTemplateName() { return "server/plugins/section_links.twig"; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 40 => 7, 31 => 4, 26 => 3, 22 => 2, 19 => 1,); } /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */ public function getSource() { @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED); return $this->getSourceContext()->getCode(); } public function getSourceContext() { return new Twig_Source("", "server/plugins/section_links.twig", "/usr/local/cpanel/base/3rdparty/phpMyAdmin/templates/server/plugins/section_links.twig");

    Thank you.
     
  2. dalem

    dalem Well-Known Member PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,883
    Likes Received:
    118
    Trophy Points:
    368
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelLauren likes this.
  3. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,750
    Likes Received:
    436
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. oemi

    oemi Registered

    Joined:
    Mar 31, 2019
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    South Africa
    cPanel Access Level:
    Website Owner
    Hi Dalem, Thank you for your very prompt and very helpful reply. I will post again about any developments/further information or queries about my issue as and when I know.
     
  5. oemi

    oemi Registered

    Joined:
    Mar 31, 2019
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    South Africa
    cPanel Access Level:
    Website Owner
    Hi cPanelLauren, thank you for your helpful reply. My first experience of the cPanel Forums has been good. I'm still on the TWIG case and will post again if need be.
     
    cPanelLauren likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice