Twig_Error_Loader
Unable to find template "frontend/gamma-prodotti-deodoranti-men.html" (looked into: private/beautycare/templates). Twig_Error_Loader thrown with message "Unable to find template "frontend/gamma-prodotti-deodoranti-men.html" (looked into: private/beautycare/templates)." Stacktrace: #10 Twig_Error_Loader in /var/www/clients/client1/web2/private/vendor/twig/twig/lib/Twig/Loader/Filesystem.php:232 #9 Twig_Loader_Filesystem:findTemplate in /var/www/clients/client1/web2/private/vendor/twig/twig/lib/Twig/Loader/Filesystem.php:150 #8 Twig_Loader_Filesystem:getCacheKey in /var/www/clients/client1/web2/private/vendor/twig/twig/lib/Twig/Environment.php:329 #7 Twig_Environment:getTemplateClass in /var/www/clients/client1/web2/private/vendor/twig/twig/lib/Twig/Environment.php:419 #6 Twig_Environment:loadTemplate in /var/www/clients/client1/web2/private/vendor/twig/twig/lib/Twig/Environment.php:362 #5 Twig_Environment:render in /var/www/clients/client1/web2/private/vendor/phpcraft/template/src/TwigAdapter.php:34 #4 PHPCraft\Template\TwigAdapter:render in /var/www/clients/client1/web2/private/vendor/phpcraft/subject/src/Subject.php:211 #3 PHPCraft\Subject\Subject:renderTemplate in /var/www/clients/client1/web2/web/private/beautycare/libraries/Frontend.php:111 #2 Beautycare\Frontend:execBrowse in /var/www/clients/client1/web2/private/vendor/phpcraft/subject/src/Subject.php:142 #1 PHPCraft\Subject\Subject:execAction in /var/www/clients/client1/web2/web/private/beautycare/procedures/bootstrap.php:42 #0 require in /var/www/clients/client1/web2/web/index.php:6
Stack frames (11)
10
Twig_Error_Loader
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Loader
/
Filesystem.php
232
9
Twig_Loader_Filesystem
findTemplate
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Loader
/
Filesystem.php
150
8
Twig_Loader_Filesystem
getCacheKey
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
329
7
Twig_Environment
getTemplateClass
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
419
6
Twig_Environment
loadTemplate
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
362
5
Twig_Environment
render
/
vendor
/
phpcraft
/
template
/
src
/
TwigAdapter.php
34
4
PHPCraft
\
Template
\
TwigAdapter
render
/
vendor
/
phpcraft
/
subject
/
src
/
Subject.php
211
3
PHPCraft
\
Subject
\
Subject
renderTemplate
/
var
/
www
/
clients
/
client1
/
web2
/
web
/
private
/
beautycare
/
libraries
/
Frontend.php
111
2
Beautycare
\
Frontend
execBrowse
/
vendor
/
phpcraft
/
subject
/
src
/
Subject.php
142
1
PHPCraft
\
Subject
\
Subject
execAction
/
var
/
www
/
clients
/
client1
/
web2
/
web
/
private
/
beautycare
/
procedures
/
bootstrap.php
42
0
require
/
var
/
www
/
clients
/
client1
/
web2
/
web
/
index.php
6
/
var
/
www
/
clients
/
client1
/
web2
/
private
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Loader
/
Filesystem.php
            if (!$this->isAbsolutePath($path)) {
                $path = $this->rootPath.'/'.$path;
            }
 
            if (is_file($path.'/'.$shortname)) {
                if (false !== $realpath = realpath($path.'/'.$shortname)) {
                    return $this->cache[$name] = $realpath;
                }
 
                return $this->cache[$name] = $path.'/'.$shortname;
            }
        }
 
        $this->errorCache[$name] = sprintf('Unable to find template "%s" (looked into: %s).', $name, implode(', ', $this->paths[$namespace]));
 
        if (!$throw) {
            return false;
        }
 
        throw new Twig_Error_Loader($this->errorCache[$name]);
    }
 
    protected function parseName($name, $default = self::MAIN_NAMESPACE)
    {
        if (isset($name[0]) && '@' == $name[0]) {
            if (false === $pos = strpos($name, '/')) {
                throw new Twig_Error_Loader(sprintf('Malformed namespaced template name "%s" (expecting "@namespace/template_name").', $name));
            }
 
            $namespace = substr($name, 1, $pos - 1);
            $shortname = substr($name, $pos + 1);
 
            return array($namespace, $shortname);
        }
 
        return array($default, $name);
    }
 
    protected function normalizeName($name)
    {
/
var
/
www
/
clients
/
client1
/
web2
/
private
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Loader
/
Filesystem.php
        }
    }
 
    public function getSource($name)
    {
        @trigger_error(sprintf('Calling "getSource" on "%s" is deprecated since 1.27. Use getSourceContext() instead.', get_class($this)), E_USER_DEPRECATED);
 
        return file_get_contents($this->findTemplate($name));
    }
 
    public function getSourceContext($name)
    {
        $path = $this->findTemplate($name);
 
        return new Twig_Source(file_get_contents($path), $name, $path);
    }
 
    public function getCacheKey($name)
    {
        $path = $this->findTemplate($name);
        $len = strlen($this->rootPath);
        if (0 === strncmp($this->rootPath, $path, $len)) {
            return substr($path, $len);
        }
 
        return $path;
    }
 
    public function exists($name)
    {
        $name = $this->normalizeName($name);
 
        if (isset($this->cache[$name])) {
            return true;
        }
 
        try {
            return false !== $this->findTemplate($name, false);
        } catch (Twig_Error_Loader $exception) {
            @trigger_error(sprintf('In %s::findTemplate(), you must accept a second argument that when set to "false" returns "false" instead of throwing an exception. Not supporting this argument is deprecated since version 1.27.', get_class($this)), E_USER_DEPRECATED);
/
var
/
www
/
clients
/
client1
/
web2
/
private
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
    /**
     * Gets the template class associated with the given string.
     *
     * The generated template class is based on the following parameters:
     *
     *  * The cache key for the given template;
     *  * The currently enabled extensions;
     *  * Whether the Twig C extension is available or not;
     *  * PHP version;
     *  * Twig version;
     *  * Options with what environment was created.
     *
     * @param string   $name  The name for which to calculate the template class name
     * @param int|null $index The index if it is an embedded template
     *
     * @return string The template class name
     */
    public function getTemplateClass($name, $index = null)
    {
        $key = $this->getLoader()->getCacheKey($name).$this->optionsHash;
 
        return $this->templateClassPrefix.hash('sha256', $key).(null === $index ? '' : '_'.$index);
    }
 
    /**
     * Gets the template class prefix.
     *
     * @return string The template class prefix
     *
     * @deprecated since 1.22 (to be removed in 2.0)
     */
    public function getTemplateClassPrefix()
    {
        @trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
 
        return $this->templateClassPrefix;
    }
 
    /**
     * Renders a template.
/
var
/
www
/
clients
/
client1
/
web2
/
private
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
    /**
     * Loads a template internal representation.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @param string $name  The template name
     * @param int    $index The index if it is an embedded template
     *
     * @return Twig_TemplateInterface A template instance representing the given template name
     *
     * @throws Twig_Error_Loader  When the template cannot be found
     * @throws Twig_Error_Runtime When a previously generated cache is corrupted
     * @throws Twig_Error_Syntax  When an error occurred during compilation
     *
     * @internal
     */
    public function loadTemplate($name, $index = null)
    {
        $cls = $mainCls = $this->getTemplateClass($name);
        if (null !== $index) {
            $cls .= '_'.$index;
        }
 
        if (isset($this->loadedTemplates[$cls])) {
            return $this->loadedTemplates[$cls];
        }
 
        if (!class_exists($cls, false)) {
            if ($this->bcGetCacheFilename) {
                $key = $this->getCacheFilename($name);
            } else {
                $key = $this->cache->generateKey($name, $mainCls);
            }
 
            if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
                $this->cache->load($key);
            }
 
            if (!class_exists($cls, false)) {
/
var
/
www
/
clients
/
client1
/
web2
/
private
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
        @trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
 
        return $this->templateClassPrefix;
    }
 
    /**
     * Renders a template.
     *
     * @param string $name    The template name
     * @param array  $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     *
     * @throws Twig_Error_Loader  When the template cannot be found
     * @throws Twig_Error_Syntax  When an error occurred during compilation
     * @throws Twig_Error_Runtime When an error occurred during rendering
     */
    public function render($name, array $context = array())
    {
        return $this->loadTemplate($name)->render($context);
    }
 
    /**
     * Displays a template.
     *
     * @param string $name    The template name
     * @param array  $context An array of parameters to pass to the template
     *
     * @throws Twig_Error_Loader  When the template cannot be found
     * @throws Twig_Error_Syntax  When an error occurred during compilation
     * @throws Twig_Error_Runtime When an error occurred during rendering
     */
    public function display($name, array $context = array())
    {
        $this->loadTemplate($name)->display($context);
    }
 
    /**
     * Loads a template.
     *
/
var
/
www
/
clients
/
client1
/
web2
/
private
/
vendor
/
phpcraft
/
template
/
src
/
TwigAdapter.php
    
    /**
     * Constructor.
     *
     * @param Twig_Environment $renderer
     **/
    public function __construct(Twig_Environment $renderer)
    {
        $this->renderer = $renderer;
    }
 
    /**
     * Renders template
     *
     * @param string $template template path into Twig_Environment template directory
     * @param array $templateParameters parameters to be passed to template
     **/
    public function render($template, $templateParameters = [])
    {
        return $this->renderer->render($template.'.html', $templateParameters);
    }
    
    /**
     * adds a function
     *
     * @param string $template template path into Twig_Environment template directory
     * @param array $templateParameters parameters to be passed to template
     **/
    public function addFunction($name, $functionBody)
    {
        $function = new \Twig_SimpleFunction($name, $functionBody);
        $this->renderer->addFunction($function);
    }
}
/
var
/
www
/
clients
/
client1
/
web2
/
private
/
vendor
/
phpcraft
/
subject
/
src
/
Subject.php
     * Sets a template parameter
     * @param string $key;
     * @param mixed $value;
     **/
    public function setTemplateParameter($key, $value)
    {
        $this->templateParameters[$key] = $value;
    }
    
    /**
     * Renders action template
     * @param string $path;
     **/
    protected function renderTemplate($path = false)
    {
        if(!$path) {
            $path = sprintf('%s/%s/%s', $this->area, $this->subject, $this->action);
        }
        $this->templateParameters['translations'] = $this->translations;
        $html = $this->template->render($path, $this->templateParameters);
        $this->httpStream->write($html);
    }
}
/
var
/
www
/
clients
/
client1
/
web2
/
web
/
private
/
beautycare
/
libraries
/
Frontend.php
            [
                'slug' => 'prodotti','nome' => $this->translations['frontend']['main_menu']['prodotti_link'],
            ],
            /*[
                'slug' => 'espositori','nome' => $this->translations['frontend']['main_menu']['display_link']
            ]
            [
                'slug' => 'artworks','nome' => $this->translations['frontend']['main_menu']['artworks_link']
            ],*/
            [
                'slug' => 'utenti/' . $logAction,'nome' => $logLabel
            ]
        ];
        //handle subject
        $template = $this->{'display' . ucfirst($this->subject)}();
        $this->templateParameters['page_title'] = sprintf('%s - %s - %s', $this->translations['application']['marketing']['brand'], $this->translations['application']['marketing']['division'], $this->translations['application']['marketing']['area']);
        //$this->setPageTitle($this->templateParameters['subject_title']);
        //$this->templateParameters['translations'] = $this->translations;
 
        $this->renderTemplate('frontend/' . $template);
    }
 
    /**
     * displays prodotti
     * @return string $template
     */
    private function displayProdotti()
    {
        //locale
        $this->addApplicationTranslations('prodotti','prodotti.ini');
        //currently selected path
        if(!isset($this->routeParameters['path'])) {
            $categorieSelezionate = [];
        } else {
            $categorieSelezionate = explode('/', $this->routeParameters['path']);
            $this->templateParameters['currentPath'] = array_merge($this->templateParameters['currentPath'], $categorieSelezionate);
        }
        //immagine testata di default
        $this->templateParameters['immagineTestata'] = 'public/beautycare/assets/images/testata_default.png';
        //menu
/
var
/
www
/
clients
/
client1
/
web2
/
private
/
vendor
/
phpcraft
/
subject
/
src
/
Subject.php
     * @param string $pathToIniFile file path into private/application-name/curent-language/
     * @throws InvalidArgumentException if file is not found
     **/
    public function addApplicationTranslations($key, $pathToIniFile)
    {
        $path = sprintf('private/%s/locales/%s/%s', $this->application, $this->language, $pathToIniFile);
        $this->addTranslations($key, $path);
    }
    
    /**
     * tries to exec current action
     * @throws Exception if there is no method defined to handle action
     **/
    public function execAction()
    {
        try {
            $this->templateParameters['area'] = $this->area;
            $this->templateParameters['areaAuthentication'] = $this->areaAuthentication;
            $this->getBackPaths();
            $this->{'exec'.ucfirst($this->sanitizeAction($this->action))}();
        } catch(Exception $exception) {
            throw new Exception(sprintf('no method for handling %s %s %s', $this->area, $this->subject, $this->action));
        }
    }
    
    /**
     * Stores a path to turn back lately
     **/
    public function execBackPath()
    {
        $arguments = array(
            'backId' => FILTER_SANITIZE_STRING,
            'backPath' =>  array(
                        'filter' => FILTER_SANITIZE_URL,
                        'flags' => FILTER_FLAG_PATH_REQUIRED
                    ),
            'backLabel' => FILTER_SANITIZE_STRING,
        );
        $input = filter_input_array(INPUT_POST, $arguments);
        $this->cookie->set('backPaths[' . $input['backId'] . '][path]', $input['backPath']);
/
var
/
www
/
clients
/
client1
/
web2
/
web
/
private
/
beautycare
/
procedures
/
bootstrap.php
    if(!in_array(LANGUAGE, $configuration['languages'])) throw new Exception("language not into configured languages");
    //load specific area configuration and procedure if needed
    if($configuration['areas'][AREA]['configuration']) {
        require sprintf('private/%s/configurations/%s.php', APPLICATION, AREA);
    }
    if($configuration['areas'][AREA]['procedure']) {
        require sprintf('private/%s/procedures/%s.php', APPLICATION, AREA);
    }
    //require subject procedure
    $subject = require sprintf('private/%s/procedures/%s/%s.php', APPLICATION, AREA, SUBJECT);
    //load specific application and area translations if needed
    if($configuration['locale']) {
        $subject->addApplicationTranslations('application', 'application.ini');
    }
    if($configuration['areas'][AREA]['locale']) {
        $subject->addApplicationTranslations(AREA, sprintf('%s.ini', AREA));
    }
 
    //subject action
    $subject->execAction();
}
//output
    // set headers
foreach ($http->response->getHeaders() as $name => $values) {
    foreach ($values as $value) {
        @header(sprintf('%s: %s', $name, $value), false);
    }
}
    //check status code
switch($http->response->getStatusCode()) {
    case 200:
    break;
    default:
        @header($_SERVER["SERVER_PROTOCOL"]." " . $http->response->getStatusCode());
    break;
}
    // output body
$http->response = $http->response->withBody($http->stream);
echo $http->response->getBody();
 
/
var
/
www
/
clients
/
client1
/
web2
/
web
/
index.php
<?php
//application name and namesapce
define('APPLICATION','beautycare');
define('APPLICATION_NAMESPACE','Beautycare');
//bootstrap
require sprintf('private/%s/procedures/bootstrap.php', APPLICATION);

Environment & details:

empty
empty
empty
empty
empty
Key Value
PHP_FCGI_MAX_REQUESTS 5000
PHPRC /var/www/conf/web2
PWD /var/www/php-fcgi-scripts/web2
TMPDIR /var/www/clients/client1/web2/tmp
TEMP /var/www/clients/client1/web2/tmp
SHLVL 0
TMP /var/www/clients/client1/web2/tmp
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PHP_DOCUMENT_ROOT /var/www/clients/client1/web2
CONTENT_LENGTH 0
HTTP_CONNECTION close
SCRIPT_NAME /index.php
REQUEST_URI /prodotti/neutromed/uomo/deodoranti-men
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/2.0
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /prodotti/neutromed/uomo/deodoranti-men
REMOTE_PORT 57658
SCRIPT_FILENAME /var/www/beautycare.hbcwebtools.it/web/index.php
SERVER_ADMIN webmaster@beautycare.hbcwebtools.it
CONTEXT_DOCUMENT_ROOT /var/www/beautycare.hbcwebtools.it/web
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /var/www/beautycare.hbcwebtools.it/web
REMOTE_ADDR 3.227.252.87
SERVER_PORT 443
SERVER_ADDR 65.108.156.216
SERVER_NAME beautycare.hbcwebtools.it
SERVER_SOFTWARE Apache
SERVER_SIGNATURE
HTTP_HOST beautycare.hbcwebtools.it
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
SSL_TLS_SNI beautycare.hbcwebtools.it
HTTPS on
H2_STREAM_TAG 131-3
H2_STREAM_ID 3
H2_PUSHED_ON
H2_PUSHED
H2_PUSH off
H2PUSH off
HTTP2 on
SCRIPT_URI https://beautycare.hbcwebtools.it/prodotti/neutromed/uomo/deodoranti-men
SCRIPT_URL /prodotti/neutromed/uomo/deodoranti-men
REDIRECT_STATUS 200
REDIRECT_SSL_TLS_SNI beautycare.hbcwebtools.it
REDIRECT_HTTPS on
REDIRECT_H2_STREAM_TAG 131-3
REDIRECT_H2_STREAM_ID 3
REDIRECT_H2_PUSHED_ON
REDIRECT_H2_PUSHED
REDIRECT_H2_PUSH off
REDIRECT_H2PUSH off
REDIRECT_HTTP2 on
REDIRECT_SCRIPT_URI https://beautycare.hbcwebtools.it/prodotti/neutromed/uomo/deodoranti-men
REDIRECT_SCRIPT_URL /prodotti/neutromed/uomo/deodoranti-men
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711654520.0507
REQUEST_TIME 1711654520
empty
0. Whoops\Handler\PrettyPageHandler