Symfony \ Component \ Yaml \ Exception \ ParseException
Symfony\Component\Yaml\Exception\ParseException thrown with message "The YAML value does not appear to be valid UTF-8." Stacktrace: #14 Symfony\Component\Yaml\Exception\ParseException in /home/basilethyl/www/perso/aku/vendor/symfony/yaml/Parser.php:58 #13 Symfony\Component\Yaml\Parser:parse in /home/basilethyl/www/perso/aku/vendor/symfony/yaml/Yaml.php:68 #12 Symfony\Component\Yaml\Yaml:parse in /home/basilethyl/www/perso/aku/user/plugins/comments/comments.php:342 #11 Grav\Plugin\CommentsPlugin:getDataFromFilename in /home/basilethyl/www/perso/aku/user/plugins/comments/comments.php:305 #10 Grav\Plugin\CommentsPlugin:fetchComments in /home/basilethyl/www/perso/aku/user/plugins/comments/comments.php:61 #9 Grav\Plugin\CommentsPlugin:onTwigSiteVariables in /home/basilethyl/www/perso/aku/vendor/symfony/event-dispatcher/EventDispatcher.php:181 #8 call_user_func in /home/basilethyl/www/perso/aku/vendor/symfony/event-dispatcher/EventDispatcher.php:181 #7 Symfony\Component\EventDispatcher\EventDispatcher:doDispatch in /home/basilethyl/www/perso/aku/vendor/symfony/event-dispatcher/EventDispatcher.php:46 #6 Symfony\Component\EventDispatcher\EventDispatcher:dispatch in /home/basilethyl/www/perso/aku/vendor/rockettheme/toolbox/Event/src/EventDispatcher.php:23 #5 RocketTheme\Toolbox\Event\EventDispatcher:dispatch in /home/basilethyl/www/perso/aku/system/src/Grav/Common/Grav.php:449 #4 Grav\Common\Grav:fireEvent in /home/basilethyl/www/perso/aku/system/src/Grav/Common/Twig/Twig.php:310 #3 Grav\Common\Twig\Twig:processSite in /home/basilethyl/www/perso/aku/system/src/Grav/Common/Grav.php:186 #2 Grav\Common\Grav:Grav\Common\{closure} in /home/basilethyl/www/perso/aku/vendor/pimple/pimple/src/Pimple/Container.php:113 #1 Pimple\Container:offsetGet in /home/basilethyl/www/perso/aku/system/src/Grav/Common/Grav.php:288 #0 Grav\Common\Grav:process in /home/basilethyl/www/perso/aku/index.php:38

The YAML value does not appear to be valid UTF-8.

Stack frames (15):
14 Symfony\Component\Yaml\Exception\ParseException
…/­vendor/­symfony/­yaml/­Parser.php58
13 Symfony\Component\Yaml\Parser parse
…/­vendor/­symfony/­yaml/­Yaml.php68
12 Symfony\Component\Yaml\Yaml parse
…/­user/­plugins/­comments/­comments.php342
11 Grav\Plugin\CommentsPlugin getDataFromFilename
…/­user/­plugins/­comments/­comments.php305
10 Grav\Plugin\CommentsPlugin fetchComments
…/­user/­plugins/­comments/­comments.php61
9 Grav\Plugin\CommentsPlugin onTwigSiteVariables
…/­vendor/­symfony/­event-dispatcher/­EventDispatcher.php181
8 call_user_func
…/­vendor/­symfony/­event-dispatcher/­EventDispatcher.php181
7 Symfony\Component\EventDispatcher\EventDispatcher doDispatch
…/­vendor/­symfony/­event-dispatcher/­EventDispatcher.php46
6 Symfony\Component\EventDispatcher\EventDispatcher dispatch
…/­vendor/­rockettheme/­toolbox/­Event/­src/­EventDispatcher.php23
5 RocketTheme\Toolbox\Event\EventDispatcher dispatch
…/­system/­src/­Grav/­Common/­Grav.php449
4 Grav\Common\Grav fireEvent
…/­system/­src/­Grav/­Common/­Twig/­Twig.php310
3 Grav\Common\Twig\Twig processSite
…/­system/­src/­Grav/­Common/­Grav.php186
2 Grav\Common\Grav Grav\Common\{closure}
…/­vendor/­pimple/­pimple/­src/­Pimple/­Container.php113
1 Pimple\Container offsetGet
…/­system/­src/­Grav/­Common/­Grav.php288
0 Grav\Common\Grav process
…/­index.php38
/home/basilethyl/www/perso/aku/vendor/symfony/yaml/Parser.php
     * @param bool   $objectForMap           true if maps should return a stdClass instead of array()
     *
     * @return mixed A PHP value
     *
     * @throws ParseException If the YAML is not valid
     */
    public function parse($value, $exceptionOnInvalidType = false, $objectSupport = false, $objectForMap = false)
    {
        if (!preg_match('//u', $value)) {
            throw new ParseException('The YAML value does not appear to be valid UTF-8.');
        }
        $this->currentLineNb = -1;
        $this->currentLine = '';
        $value = $this->cleanup($value);
        $this->lines = explode("\n", $value);
 
        if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) {
            $mbEncoding = mb_internal_encoding();
            mb_internal_encoding('UTF-8');
        }
/home/basilethyl/www/perso/aku/vendor/symfony/yaml/Yaml.php
            }
 
            $file = $input;
            $input = file_get_contents($file);
        }
 
        $yaml = new Parser();
 
        try {
            return $yaml->parse($input, $exceptionOnInvalidType, $objectSupport, $objectForMap);
        } catch (ParseException $e) {
            if ($file) {
                $e->setParsedFile($file);
            }
 
            throw $e;
        }
    }
 
    /**
/home/basilethyl/www/perso/aku/user/plugins/comments/comments.php
 
        //Single item details
        $fileInstance = File::instance(DATA_DIR . 'comments/' . $fileRoute);
 
        if (!$fileInstance->content()) {
            //Item not found
            return;
        }
 
        return Yaml::parse($fileInstance->content());
    }
 
    /**
     * Add templates directory to twig lookup paths.
     */
    public function onTwigTemplatePaths()
    {
        $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';
    }
 
/home/basilethyl/www/perso/aku/user/plugins/comments/comments.php
 
    /**
     * Return the comments associated to the current route
     */
    private function fetchComments() {
        $lang = $this->grav['language']->getLanguage();
        $filename = $lang ? '/' . $lang : '';
        $filename .= $this->grav['uri']->path() . '.yaml';
 
        return $this->getDataFromFilename($filename)['comments'];
    }
 
    /**
     * Return the latest commented pages
     */
    private function fetchPages() {
        $files = [];
        $files = $this->getFilesOrderedByModifiedDate();
 
        $pages = [];
/home/basilethyl/www/perso/aku/user/plugins/comments/comments.php
            }
        }
    }
 
    public function onTwigSiteVariables() {
        if (!$this->isAdmin()) {
            $this->grav['twig']->enable = $this->enable;
 
            if ($this->enable) {
                $this->grav['twig']->comments = $this->fetchComments();
            }
        }
    }
 
    /**
     * Determine if $haystack starts with $needle. Credit: http://stackoverflow.com/a/10473026/205039
     */
    private function startsWith($haystack, $needle) {
        return $needle === "" || strrpos($haystack, $needle, -strlen($haystack)) !== FALSE;
    }
/home/basilethyl/www/perso/aku/vendor/symfony/event-dispatcher/EventDispatcher.php
     * for each listener.
     *
     * @param callable[] $listeners The event listeners.
     * @param string     $eventName The name of the event to dispatch.
     * @param Event      $event     The event object to pass to the event handlers/listeners.
     */
    protected function doDispatch($listeners, $eventName, Event $event)
    {
        foreach ($listeners as $listener) {
            call_user_func($listener, $event, $eventName, $this);
            if ($event->isPropagationStopped()) {
                break;
            }
        }
    }
 
    /**
     * Sorts the internal list of listeners for the given event by priority.
     *
     * @param string $eventName The name of the event.
/home/basilethyl/www/perso/aku/vendor/symfony/event-dispatcher/EventDispatcher.php
     * for each listener.
     *
     * @param callable[] $listeners The event listeners.
     * @param string     $eventName The name of the event to dispatch.
     * @param Event      $event     The event object to pass to the event handlers/listeners.
     */
    protected function doDispatch($listeners, $eventName, Event $event)
    {
        foreach ($listeners as $listener) {
            call_user_func($listener, $event, $eventName, $this);
            if ($event->isPropagationStopped()) {
                break;
            }
        }
    }
 
    /**
     * Sorts the internal list of listeners for the given event by priority.
     *
     * @param string $eventName The name of the event.
/home/basilethyl/www/perso/aku/vendor/symfony/event-dispatcher/EventDispatcher.php
    {
        if (null === $event) {
            $event = new Event();
        }
 
        $event->setDispatcher($this);
        $event->setName($eventName);
 
        if ($listeners = $this->getListeners($eventName)) {
            $this->doDispatch($listeners, $eventName, $event);
        }
 
        return $event;
    }
 
    /**
     * {@inheritdoc}
     */
    public function getListeners($eventName = null)
    {
/home/basilethyl/www/perso/aku/vendor/rockettheme/toolbox/Event/src/EventDispatcher.php
 */
class EventDispatcher extends BaseEventDispatcher implements EventDispatcherInterface
{
    public function dispatch($eventName, BaseEvent $event = null)
    {
        if (null === $event) {
            $event = new Event();
        }
 
        return parent::dispatch($eventName, $event);
    }
}
 
/home/basilethyl/www/perso/aku/system/src/Grav/Common/Grav.php
     * @param  Event  $event
     *
     * @return Event
     */
    public function fireEvent($eventName, Event $event = null)
    {
        /** @var EventDispatcher $events */
        $events = $this['events'];
 
        return $events->dispatch($eventName, $event);
    }
 
    /**
     * Set the final content length for the page and flush the buffer
     *
     */
    public function shutdown()
    {
        // Prevent user abort allowing onShutdown event to run without interruptions.
        if (function_exists('ignore_user_abort')) {
/home/basilethyl/www/perso/aku/system/src/Grav/Common/Twig/Twig.php
     *
     * @param string $format Output format (defaults to HTML).
     *
     * @return string the rendered output
     * @throws \RuntimeException
     */
    public function processSite($format = null)
    {
        // set the page now its been processed
        $this->grav->fireEvent('onTwigSiteVariables');
        $pages = $this->grav['pages'];
        $page = $this->grav['page'];
        $content = $page->content();
 
        $twig_vars = $this->twig_vars;
 
        $twig_vars['pages'] = $pages->root();
        $twig_vars['page'] = $page;
        $twig_vars['header'] = $page->header();
        $twig_vars['media'] = $page->media();
/home/basilethyl/www/perso/aku/system/src/Grav/Common/Grav.php
                    throw new \RuntimeException('Page Not Found', 404);
                }
            }
 
            return $page;
        };
 
        $container['output'] = function ($c) {
            /** @var Grav $c */
            return $c['twig']->processSite($c['uri']->extension());
        };
 
        $container['browser'] = function () {
            return new Browser();
        };
 
        $container->register(new StreamsServiceProvider);
        $container->register(new ConfigServiceProvider);
 
        $container['inflector'] = new Inflector();
/home/basilethyl/www/perso/aku/vendor/pimple/pimple/src/Pimple/Container.php
        ) {
            return $this->values[$id];
        }
 
        if (isset($this->factories[$this->values[$id]])) {
            return $this->values[$id]($this);
        }
 
        $raw = $this->values[$id];
        $val = $this->values[$id] = $raw($this);
        $this->raw[$id] = $raw;
 
        $this->frozen[$id] = true;
 
        return $val;
    }
 
    /**
     * Checks if a parameter or an object is set.
     *
/home/basilethyl/www/perso/aku/system/src/Grav/Common/Grav.php
        $this['pages']->init();
        $this->fireEvent('onPagesInitialized');
        $debugger->stopTimer('pages');
        $this->fireEvent('onPageInitialized');
 
        $debugger->addAssets();
 
        // Process whole page as required
        $debugger->startTimer('render', 'Render');
        $this->output = $this['output'];
        $this->fireEvent('onOutputGenerated');
        $debugger->stopTimer('render');
 
        // Set the header type
        $this->header();
        echo $this->output;
        $debugger->render();
 
        $this->fireEvent('onOutputRendered');
 
/home/basilethyl/www/perso/aku/index.php
// Get the Grav instance
$grav = Grav::instance(
    array(
        'loader' => $loader
    )
);
 
// Process the page
try {
    $grav->process();
} catch (\Exception $e) {
    $grav->fireEvent('onFatalException');
    throw $e;
}
 
 

Environment & details:

empty
empty
empty
empty
Key Value
user
User {
  #gettersVariable: "items"
  #items: []
  #blueprints: null
  #storage: null
}
Key Value
USER
"basilethyl"
FCGI_ROLE
"RESPONDER"
REDIRECT_STATUS
"200"
UNIQUE_ID
"ZgZ3UOU3aB2IbBXygU6cHAAAAKU"
GEOIP_COUNTRY_CODE
"US"
GEOIP_COUNTRY_NAME
"United States"
GEOIP_REGION
"VA"
GEOIP_CITY
"Ashburn"
GEOIP_DMA_CODE
"511"
GEOIP_AREA_CODE
"703"
GEOIP_LATITUDE
"39.046902"
GEOIP_LONGITUDE
"-77.490303"
SCRIPT_URL
"/perso/aku/blog/yololo-tralala"
SCRIPT_URI
"http://basiletherer.com/perso/aku/blog/yololo-tralala"
CFG_CLUSTER
"cluster011"
ENVIRONMENT
"production"
HTTP_HOST
"basiletherer.com"
HTTP_X_PREDICTOR
"1"
HTTP_X_FORWARDED_FOR
"44.223.42.120"
HTTP_X_FORWARDED_PROTO
"http"
HTTP_X_OVHREQUEST_ID
"def8fdfc882cfee878744a5444903054"
HTTP_ACCEPT
"*/*"
HTTP_USER_AGENT
"claudebot"
HTTP_X_FORWARDED_PORT
"80"
HTTP_X_REMOTE_PORT
"48402"
HTTP_X_REMOTE_IP
"44.223.42.120"
HTTP_X_REMOTE_PROTO
"http"
HTTP_FORWARDED
"for=44.223.42.120; proto=http; host=basiletherer.com"
HTTP_REMOTE_PORT
"48402"
HTTP_X_IPLB_UNIQUE_ID
"2CDF2A78:BD12_D5BA2128:0050_66067750_5C7CF:64D3"
HTTP_REMOTE_IP
"44.223.42.120"
SERVER_SIGNATURE
""
SERVER_SOFTWARE
"Apache"
SERVER_NAME
"basiletherer.com"
SERVER_ADDR
"10.11.20.13"
SERVER_PORT
"80"
REMOTE_ADDR
"44.223.42.120"
DOCUMENT_ROOT
"/home/basilethyl/www"
SERVER_ADMIN
"postmaster@basiletherer.com"
SCRIPT_FILENAME
"/home/basilethyl/www/perso/aku/index.php"
REMOTE_PORT
"28986"
REDIRECT_URL
"/perso/aku/blog/yololo-tralala"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.1"
REQUEST_METHOD
"GET"
QUERY_STRING
""
REQUEST_URI
"/perso/aku/blog/yololo-tralala"
SCRIPT_NAME
"/perso/aku/index.php"
PHP_SELF
"/perso/aku/index.php"
REQUEST_TIME_FLOAT
1711699792.4888
REQUEST_TIME
1711699792
argv
[]
argc
0
Key Value
USER
"basilethyl"
FCGI_ROLE
"RESPONDER"
REDIRECT_STATUS
"200"
UNIQUE_ID
"ZgZ3UOU3aB2IbBXygU6cHAAAAKU"
GEOIP_COUNTRY_CODE
"US"
GEOIP_COUNTRY_NAME
"United States"
GEOIP_REGION
"VA"
GEOIP_CITY
"Ashburn"
GEOIP_DMA_CODE
"511"
GEOIP_AREA_CODE
"703"
GEOIP_LATITUDE
"39.046902"
GEOIP_LONGITUDE
"-77.490303"
SCRIPT_URL
"/perso/aku/blog/yololo-tralala"
SCRIPT_URI
"http://basiletherer.com/perso/aku/blog/yololo-tralala"
CFG_CLUSTER
"cluster011"
ENVIRONMENT
"production"
HTTP_HOST
"basiletherer.com"
HTTP_X_PREDICTOR
"1"
HTTP_X_FORWARDED_FOR
"44.223.42.120"
HTTP_X_FORWARDED_PROTO
"http"
HTTP_X_OVHREQUEST_ID
"def8fdfc882cfee878744a5444903054"
HTTP_ACCEPT
"*/*"
HTTP_USER_AGENT
"claudebot"
HTTP_X_FORWARDED_PORT
"80"
HTTP_X_REMOTE_PORT
"48402"
HTTP_X_REMOTE_IP
"44.223.42.120"
HTTP_X_REMOTE_PROTO
"http"
HTTP_FORWARDED
"for=44.223.42.120; proto=http; host=basiletherer.com"
HTTP_REMOTE_PORT
"48402"
HTTP_X_IPLB_UNIQUE_ID
"2CDF2A78:BD12_D5BA2128:0050_66067750_5C7CF:64D3"
HTTP_REMOTE_IP
"44.223.42.120"
SERVER_SIGNATURE
""
SERVER_SOFTWARE
"Apache"
SERVER_NAME
"basiletherer.com"
SERVER_ADDR
"10.11.20.13"
SERVER_PORT
"80"
REMOTE_ADDR
"44.223.42.120"
DOCUMENT_ROOT
"/home/basilethyl/www"
SERVER_ADMIN
"postmaster@basiletherer.com"
SCRIPT_FILENAME
"/home/basilethyl/www/perso/aku/index.php"
REMOTE_PORT
"28986"
REDIRECT_URL
"/perso/aku/blog/yololo-tralala"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.1"
REQUEST_METHOD
"GET"
QUERY_STRING
""
REQUEST_URI
"/perso/aku/blog/yololo-tralala"
SCRIPT_NAME
"/perso/aku/index.php"
PHP_SELF
"/perso/aku/index.php"
REQUEST_TIME_FLOAT
1711699792.4888
REQUEST_TIME
1711699792
argv
[]
argc
0
0. Whoops\Handler\PrettyPageHandler
1. Whoops\Handler\CallbackHandler