Twig\Error\RuntimeError {#668 -lineno: 16 -name: "Default/blogtags.html.twig" -rawMessage: "Key "0" does not exist as the array is empty." -sourcePath: "/usr/www/users/smartm/templates/Default/blogtags.html.twig" -sourceCode: """ {# app/Resources/TwigBundle/views/Exception/error404.html.twig #}\n {% extends 'baserfp.html.twig' %}\n {% block head %} \n {% set currentPathdHeader = app.request.getSchemeAndHttpHost() %}\n {% if currentPathdHeader=="https://testing.transportstake.com" or currentPathdHeader=="https://www.transportstake.com" %}\n <title>\n {{blogtags}} | Transport Stake\n </title>\n {% else %}\n <title>\n {{blogtags}} | Smart Money Match\n </title>\n {% endif %}\n {% set eventtitformat = blogtags|replace([' ', '-']) %}\n <link rel="canonical" href="https://www.smartmoneymatch.com/blogs/{{eventtitformat}}" />\n <meta name="description" content="{{exist_desc[0]['description']}}"> \n \n \t{{parent()}} \n {% endblock %}\n \n {% block body %}\n <!DOCTYPE html>\n {% set currhosts = app.request.getSchemeAndHttpHost() %}\n \t\n \n {% if app.user %}\n \t{{ render(controller('App\\Controller\\HomeController::breadAction', {'title': 'Create Blog','profile':'1'})) }}\n {% endif %}\n \n <section class="blog_banner">\n \t<div class="container">\n \t<div class="row">\n \t<div class="col-md-9 col-sm-9">\n \t<div class="blog_headng">\n \t{% if currhosts=="https://testing.transportstake.com" or currhosts=="https://www.transportstake.com" %}\n \t <h2 class="subtitle" style="color:#fff;margin:0px;padding-top:70px;padding-right:0px;padding-left:0px">Transport Stake</h2>\n \t <h6>Transport Stake is the blog of Transport Stake with articles that provide the latest industry know-how, \n \t news and tips from opinion leaders in the carrier industry.\n \t <br>For more news and data, also visit our <a style="font-size:17px" href="{{ path('frontend_news')}}">News Center</a>. \n \t <br>You might also be interested in the blogs of <a style="font-size:17px" href="https://www.smartmoneymatch.com/blogs">SmartMoneyMatch</a>, <a style="font-size:17px" href="https://www.publicitymarketplace.com/blogs">Publicity Marketplace</a>, <a style="font-size:17px" href="https://www.educationstake.com/blogs">Education Stake</a>, and <a style="font-size:17px" href="https://www.functionalsourcing.com/blogs">Functional Sourcing</a>.\n \t </h6>\n \t {% else %}\n \t <h2 class="subtitle" style="color:#fff;margin:0px;padding-top:70px;padding-right:0px;padding-left:0px">Smart Money Watch</h2>\n \t <h6>Smart Money Watch is the blog of SmartMoneyMatch with articles that provide the latest industry know-how, \n \t news and tips from opinion leaders in the asset management industry.\n \t <br>For more news and data, also visit our <a style="font-size:17px" href="{{ path('frontend_news')}}">News Center</a>. \n \t <br>You might also be interested in the blogs of <a style="font-size:17px" href="https://www.transportstake.com/blogs">Transport Stake</a>, <a style="font-size:17px" href="https://www.publicitymarketplace.com/blogs">Publicity Marketplace</a>, <a style="font-size:17px" href="https://www.educationstake.com/blogs">Education Stake</a>, and <a style="font-size:17px" href="https://www.functionalsourcing.com/blogs">Functional Sourcing</a>.\n \t </h6>\n \t {% endif %}\n \t </div>\n \t</div>\n \t </div>\t\n \t</div>\n \t</section>\n <!--banner part start-->\n \n <div class="clearfix"></div>\n <div class="container">\n \n <div class="row"> \n <div class="col-md-8 col-sm-7 col-xs-12 mbottom10">\n {#<h1 class=" text-green subtitle" id="cntlabel">{{blogtags}}</h1>#}\n </div> \n <div class="col-md-4 col-sm-5 col-xs-12 mbottom10">\n {% if app.user.getId() is defined %}\n <a class="col-xs-12 text-right mtop10" href="{{ path('article_create')}}">Create your article</a>\n {% else %}\n <a href="javascript:void(0)" data-toggle="modal" data-target="#loginmodal" class="col-xs-12 text-right mtop10">Create your article</a>\n {% endif %}\n </div>\n </div>\n \n <!-- 4 steps for mobile -->\n {% if exist_tags[0] is defined %}\n <div class="clearfix"></div>\n <div class="col-xs-12 visible-xs">\n <div class="row">\n \n <select class="selectpicker sectionsdiv tagsdropdown">\n <option value="home" data-icon="glyphicon glyphicon-ok">Home</option>\n {% for exist_tagsval in exist_tags %}\n <option value="{{exist_tagsval['title']}}">{{exist_tagsval['title']}}</option>\n {% endfor %}<option value="userstories">User Articles</option>\n </select>\n </div>\n </div>\n {% else %}\n <div class="clearfix"></div>\n <div class="col-xs-12 visible-xs">\n <div class="row">\n \n <select class="selectpicker sectionsdiv tagsdropdown">\n <option value="home" data-icon="glyphicon glyphicon-ok">Home</option>\n <option value="userstories">User Articles</option>\n </select>\n </div>\n </div>\n {% endif %}\n <!-- 4 steps for ipad/desktop -->\n {% if exist_tags[0] is defined %}\n <div class="well hidden-xs mtop5 white-bacground tabview" style="margin-bottom:0px;padding-bottom:1px">\n <div class="mleft10 col-sm-1 col-xs-12">\n <div class="row">\n <div class="step-text"><a class="hometab" style="" href="{{ path('frontend_blog')}}"> Home </a></div>\n </div>\n </div>\n {% set cntt = 0 %}\n {% for exist_tagsval in exist_tags %}\n {% if exist_tagsval['rating']=='1' or exist_tagsval['rating']=='2' or exist_tagsval['rating']=='3' %}\n \t\t\t\t\t\t\t\t\t {% if exist_tagsval['rating']=='1' %}\n \t\t\t\t\t\t\t\t\t\t {% set padcls = " hidden-sm hidden-md" %}\n \t\t\t\t\t\t\t\t\t\t {% else %} {% set padcls = " " %}\n \t\t\t\t\t\t\t\t\t\t\t {% endif %}\n <div class="mleft10 col-sm-2 col-xs-12 {{padcls}}">\n <div class="row">\n <div class="step-text">\n {% if blogtags==exist_tagsval['title'] %}\n <a class="hometab" style="color:#1a1a1a" href="{{ path('frontend_blogtags', {'blogtags':exist_tagsval['title']|replace({' ': '-'})}) }}"> {{exist_tagsval['title']}} </a>\n {% else %}\n <a class="hometab" href="{{ path('frontend_blogtags', {'blogtags':exist_tagsval['title']|replace({' ': '-'})}) }}"> {{exist_tagsval['title']}} </a>\n {% endif %}\n </div>\n </div>\n </div>\n {% endif %}\n {% set cntt = cntt+1 %}\n {% endfor %}\n <div class="mleft10 col-sm-2 col-xs-12">\n <div class="row">\n <div class="step-text"><a class="hometab" style="" href="{{ path('frontend_articles')}}"> User Articles </a></div>\n </div>\n </div>\n <div class="col-sm-1 col-xs-12 hidden-sm hidden-md" style="float:right">\n <div class="row">\n <div class="step-text">\n <a style="" href="javascript:void(0)" class="moretab">\n More<span aria-hidden="true" class="text-grey mleft10 glyphicon glyphicon-menu-down"></span>\n </a>\n <div class="clearfix"></div>\n \n <ul class="text-grey moretagdiv22" style="background-color:white;position:absolute;z-index:1;opacity:999;padding-left:17px; width: 300px; display:none;font-size:18px;list-style:none;text-decoration:none">\n {% set cntt22 = 0 %}\n {% for exist_tagsval in exist_tags %}\n {% if exist_tagsval['rating']!='1' and exist_tagsval['rating']!='2' and exist_tagsval['rating']!='3' %}\n <li><a href="{{ path('frontend_blogtags', {'blogtags':exist_tagsval['title']|replace({' ': '-'})}) }}" style="font-size:19px;text-align:left;text-decoration:none">{{exist_tagsval['title']}}</a></li>\n {% endif %}\n {% set cntt22 = cntt22+1 %}\n {% endfor %}\n </ul>\n </div>\n </div>\n </div>\n \t\t\t\t\t\t \n \t\t\t\t\t\t <div class="col-sm-2 col-xs-12 visible-sm visible-md" style="float:right">\n <div class="row">\n <div class="step-text">\n <a href="javascript:void(0)" class="moretab">\n More<span aria-hidden="true" class="text-grey mleft10 glyphicon glyphicon-menu-down"></span>\n </a>\n <div class="clearfix"></div>\n \n <ul class="text-grey moretagdiv22" style="background-color:white;position:absolute;z-index:1;opacity:999;padding-left:17px; width: 300px; display:none;font-size:18px;list-style:none;text-decoration:none">\n {% set cntt22 = 0 %}\n {% for exist_tagsval in exist_tags %}\n {% if exist_tagsval['rating']!='1' and exist_tagsval['rating']!='2' and exist_tagsval['rating']!='3' %}\n <li><a href="{{ path('frontend_blogtags', {'blogtags':exist_tagsval['title']|replace({' ': '-'})}) }}" style="font-size:19px;text-align:left;text-decoration:none">{{exist_tagsval['title']}}</a></li>\n {% endif %}\n {% set cntt22 = cntt22+1 %}\n {% endfor %}\n </ul>\n </div>\n </div>\n </div>\n \t\t\t\t\t\t \n </div>\n <div class="clearfix"></div>\n {% else %}\n <div class="well hidden-xs mtop5 white-bacground tabview" style="margin-bottom:0px;padding-bottom:1px">\n <div class="mleft10 col-sm-1 col-xs-12">\n <div class="row">\n <div class="step-text"><a class="hometab" style="color:#1a1a1a" href="{{ path('frontend_blog')}}"> Home </a></div>\n </div>\n </div>\n <div class="mleft50 col-sm-2 col-xs-12">\n <div class="row">\n <div class="step-text"><a class="hometab" style="" href="{{ path('frontend_articles')}}"> User Articles </a></div>\n </div>\n </div>\n \n </div>\n <div class="clearfix"></div>\n \n {% endif %}\n <div class="row"> \n <div class="col-md-8 col-sm-7 col-xs-12">\n <h1 class="text-green mleft20" id="cntlabel">{{blogtags}}</h1>\n </div> \n <div class="col-md-4 col-sm-5 col-xs-12">\n \n </div>\n </div>\n </div>\n <div class="container">\n <div class="row">\n <div class="col-sm-12">\n \n <div class="row"> \n \n <!--Left side panel start--> \n <div class="col-md-12 col-sm-12 col-xs-12 mtop20 ">\n <div class="white-background padd20 add_border">\n {% set cntarticle = 0 %}\n {% if exist_blogtags[0] is defined %} \n {% for aricleval in exist_blogtags %} \n \n {% set articletitle = aricleval['titleblog'] %} \n <div class="row">\n <div class="col-md-12 col-sm-12">\n <div class="post_title">\n <a style="text-decoration:none" href="{{baseurls}}/en/{{ aricleval['url_identifier'] }}"><h4 style="font-size:17px">{{ articletitle}}</h4></a> \n <span></span>\n </div>\n </div>\n \n </div>\n \t\t {% endfor %} {% endif %}\n \n \n </div>\n </div> \n \n <!--Left side panel End--\n \n <!-Right side panel start-->\n \n \n \n <!--Right side panel End--> \n \n </div>\n </div>\n </div>\n </div> \n \n </div>\n \n \n \n \n \n <script>\n \n $(function(){\n \n \t\t\t $(".tagsdropdown").change(function(){\n \t\t\t\t if($(this).val()=="home"){\n \t\t\t\t\t window.location = "{{baseurls}}"+"/"+"blogs";\n \t\t\t\t } else if($(this).val()=="userstories"){\n \t\t\t\t\t window.location = "{{baseurls}}"+"/"+"articles";\n \t\t\t\t } else {\n \t\t\t\t\t var vall = $(this).val();\n \t\t\t\t\t vall = vall.replace(" ","-");\n \t\t\t\t\t window.location = "{{baseurls}}"+"/"+"blogs/"+vall;\n \t\t\t\t }\n \t\t\t });\n \t\t\t \n $(".moretab").click(function(e){\n //e.preventDefault();\n if($(".moretagdiv22").is(":visible")){ $(".moretagdiv22").hide();\n } else { $(".moretagdiv22").show();\n }\n });\n $(".ccc").css("list-style-type","none");\n $(".ccc").addClass("closedarticle");\n \n });\n \n </script>\n {% endblock %} """ }
{{blogtags}} | Smart Money Match
</title>
{% endif %}
{% set eventtitformat = blogtags|replace([' ', '-']) %}
<link rel="canonical" href="https://www.smartmoneymatch.com/blogs/{{eventtitformat}}" />
<meta name="description" content="{{exist_desc[0]['description']}}">
{{parent()}}
{% endblock %}
{% block body %}
echo " <link rel=\"canonical\" href=\"https://www.smartmoneymatch.com/blogs/";
echo twig_escape_filter($this->env, (isset($context["eventtitformat"]) || array_key_exists("eventtitformat", $context) ? $context["eventtitformat"] : (function () { throw new RuntimeError('Variable "eventtitformat" does not exist.', 15, $this->source); })()), "html", null, true);
echo "\" />
<meta name=\"description\" content=\"";
// line 16
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["exist_desc"]) || array_key_exists("exist_desc", $context) ? $context["exist_desc"] : (function () { throw new RuntimeError('Variable "exist_desc" does not exist.', 16, $this->source); })()), 0, [], "array", false, false, false, 16), "description", [], "array", false, false, false, 16), "html", null, true);
echo "\">
\t";
// line 18
$this->displayParentBlock("head", $context, $blocks);
throw new \LogicException('A block must be a method on a \Twig\Template instance.');
}
if (null !== $template) {
try {
$template->$block($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($template->getSourceContext());
}
echo twig_escape_filter($this->env, (isset($context["deflangattr"]) || array_key_exists("deflangattr", $context) ? $context["deflangattr"] : (function () { throw new RuntimeError('Variable "deflangattr" does not exist.', 40, $this->source); })()), "html", null, true);
echo "\">
<head>
";
// line 42
$this->displayBlock('head', $context, $blocks);
// line 362
echo "
</head>
<body>
";
}
protected function displayWithErrorHandling(array $context, array $blocks = [])
{
try {
$this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Default/blogtags.html.twig"));
$this->parent = $this->loadTemplate("baserfp.html.twig", "Default/blogtags.html.twig", 2);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
protected function displayWithErrorHandling(array $context, array $blocks = [])
{
try {
$this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
ob_start();
} else {
ob_start(function () { return ''; });
}
try {
$this->display($context);
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
$this->template = $template;
}
public function render(array $context = []): string
{
return $this->template->render($context);
}
public function display(array $context = [])
{
// using func_get_args() allows to not expose the blocks argument
* @throws SyntaxError When an error occurred during compilation
* @throws RuntimeError When an error occurred during rendering
*/
public function render($name, array $context = []): string
{
return $this->load($name)->render($context);
}
/**
* Displays a template.
*
if ($v instanceof FormInterface) {
$parameters[$k] = $v->createView();
}
}
return $this->container->get('twig')->render($view, $parameters);
}
/**
* Renders a view.
*
* If an invalid form is found in the list of parameters, a 422 status code is returned.
* Forms found in parameters are auto-cast to form views.
*/
protected function render(string $view, array $parameters = [], ?Response $response = null): Response
{
$content = $this->renderView($view, $parameters);
$response ??= new Response();
if (200 === $response->getStatusCode()) {
foreach ($parameters as $v) {
if ($v instanceof FormInterface && $v->isSubmitted() && !$v->isValid()) {
$dql22 = "select description from article where id>29 and id<81 and title='".$blogtags22."'";
$existidentify_statement2 = $conn->prepare($dql22);
$existidentify_statement5 = $existidentify_statement2->execute();
$exist_desc = array();
$exist_desc = $existidentify_statement5->fetchAllAssociative(); //echo "Test";die;
return $this->render('Default/blogtags.html.twig',['exist_desc'=>$exist_desc,'blogtags'=>$blogtags,'exist_blogtags'=>$exist_blogtags,'exist_tags'=>$exist_tags,'baseurls'=>$baseurls,'description' => 'coming soon']);
}
#[Route('/premium', name: 'frontend_premium')]
public function premiumAction(Request $request,EntityManagerInterface $entityManager,UserInterface $user = null): Response {
$users = $this->security->getUser();
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response, $event);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
$response = null;
try {
return $response = $this->handleRaw($request, $type);
} catch (\Throwable $e) {
if ($e instanceof \Error && !$this->handleAllThrowables) {
throw $e;
}
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
) {
}
public function run(): int
{
$response = $this->kernel->handle($this->request);
if (Kernel::VERSION_ID >= 60400) {
$response->send(false);
if (\function_exists('fastcgi_finish_request') && !$this->debug) {
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
<?php
umask(0000);
use App\Kernel;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};
RuntimeError
|
---|
Twig\Error\RuntimeError: Key "0" does not exist as the array is empty. at templates/Default/blogtags.html.twig:16 at twig_get_attribute() (var/cache/dev/twig/24/245ab58cac331d3a0d5e1adb13b333c3.php:101) at __TwigTemplate_f29d77893efcae7a90717820f6fb7252->block_head() (vendor/twig/twig/src/Template.php:171) at Twig\Template->displayBlock() (var/cache/dev/twig/2b/2bff03775e9f219a288cb1eaa38a7230.php:170) at __TwigTemplate_e9b20df47f7b9744e081c6ef864bccf0->doDisplay() (vendor/twig/twig/src/Template.php:394) at Twig\Template->displayWithErrorHandling() (vendor/twig/twig/src/Template.php:367) at Twig\Template->display() (var/cache/dev/twig/24/245ab58cac331d3a0d5e1adb13b333c3.php:49) at __TwigTemplate_f29d77893efcae7a90717820f6fb7252->doDisplay() (vendor/twig/twig/src/Template.php:394) at Twig\Template->displayWithErrorHandling() (vendor/twig/twig/src/Template.php:367) at Twig\Template->display() (vendor/twig/twig/src/Template.php:379) at Twig\Template->render() (vendor/twig/twig/src/TemplateWrapper.php:38) at Twig\TemplateWrapper->render() (vendor/twig/twig/src/Environment.php:280) at Twig\Environment->render() (vendor/symfony/framework-bundle/Controller/AbstractController.php:243) at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->renderView() (vendor/symfony/framework-bundle/Controller/AbstractController.php:254) at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render() (src/Controller/HomeController.php:21336) at App\Controller\HomeController->blogtagsAction() (vendor/symfony/http-kernel/HttpKernel.php:181) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:76) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:197) at Symfony\Component\HttpKernel\Kernel->handle() (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35) at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (vendor/autoload_runtime.php:29) at require_once('/usr/www/users/smartm/vendor/autoload_runtime.php') (public/index.php:5) |