I've got a weird problem; I've set up a site in different languages, and everything is working a-ok, except for the homepage; when I try to acces it I get a PHP warning - you can find the full stack trace at the end of my post.
All other pages work, they show me the language I want and all. Just the homepage only works in my default language...
Any help would be greatly appreciated :-), thanks!!
Stack Trace
#0
– /data/sites/web/e-c-sbe/craft/app/etc/web/WebApp.php(687): CApplication->handleError(2, "array_chunk() expects parameter 1 to be array, null given", "/ data/sites/web/e-c-sbe/craft/app/vendor/twig/twig/lib/Twig/Exte...", 1535)
682 if (version_compare(PHP_VERSION, '7', '>=') && $code === 2 && strpos($message, 'should be compatible with') !== false)
683 {
684 return;
685 }
686
687 parent::handleError($code, $message, $file, $line);
688 }
689
690 // Private Methods
691 // =========================================================================
692
#1
unknown(0): Craft\WebApp->handleError(2, "array_chunk() expects parameter 1 to be array, null given", "/data/sites/web/e-c-sbe/craft/app/vendor/twig/twig /lib/Twig/Exte...", 1535, ...)
#2
– /data/sites/web/e-c-sbe/craft/app/vendor/twig/twig/lib/Twig/Extension/Core.php(1535): array_chunk(null, 2, true)
1530 $items = iterator_to_array($items, false);
1531 }
1532
1533 $size = ceil($size);
1534
1535 $result = array_chunk($items, $size, true);
1536
1537 if (null !== $fill && !empty($result)) {
1538 $last = count($result) - 1;
1539 if ($fillCount = $size - count($result[$last])) {
1540 $result[$last] = array_merge(
#3
– /data/sites/web/e-c-sbe/craft/storage/runtime/compiled_templates/ef/ef68483640021c461c9f0d53587a31241b074af4e80159c50a1cf3a4565420d1.php(430): twig_array_batch(null, 2)
425 <div class=\"w-slider-mask\">
426
427 ";
428 // line 162
429 $context['_parent'] = $context;
430 $context['_seq'] = twig_ensure_traversable(twig_array_batch($this->getAttribute((isset($context["entry"]) ? $context["entry"] : $this-> getContext($context, "entry")), "klantenQuotes", array()), 2));
431 foreach ($context['_seq'] as $context["_key"] => $context["slides"]) {
432 // line 163
433 echo " <div class=\"slide1 w-slide\">
434 <div class=\"slide-1-content\">
435 ";
#4
+ /data/sites/web/e-c-sbe/craft/app/vendor/twig/twig/lib/Twig/Template.php(167): __TwigTemplate_7683c934653be972173cc399f892a6300d56680399943fc28a98036775c6f34d->block_content(array("entry" => Craft\EntryModel, "user" => Craft\UserModel, "currentUser" => Craft\UserModel, "craft" => Craft\CraftVariable, ...), array("body" => array(__TwigTemplate_1684515eed9a6cf9ffb79b59311c6f12e864fc567eac8ab3dbfb422ccadd74f8, "block_body"), "bottomJs" => array(__TwigTemplate_4efd4701086b5bbbfbba3e63e2148b044c01a352aa2bed5255469320f17ec1da, "block_bottomJs"), "extraBottomJs" => array(__TwigTemplate_4efd4701086b5bbbfbba3e63e2148b044c01a352aa2bed5255469320f17ec1da, "block_extraBottomJs"), "content" => array(__TwigTemplate_7683c934653be972173cc399f892a6300d56680399943fc28a98036775c6f34d, "block_content")))
#5
+ /data/sites/web/e-c-sbe/craft/storage/runtime/compiled_templates/76/76fb570d339de61001353339d594478c1219a1ef8f5ce7d5541281bfea844196.php(208): Twig_Template->displayBlock("content", array("entry" => Craft\EntryModel, "user" => Craft\UserModel, "currentUser" => Craft\UserModel, "craft" => Craft\CraftVariable, ...), array("body" => array(__TwigTemplate_1684515eed9a6cf9ffb79b59311c6f12e864fc567eac8ab3dbfb422ccadd74f8, "block_body"), "bottomJs" => array(__TwigTemplate_4efd4701086b5bbbfbba3e63e2148b044c01a352aa2bed5255469320f17ec1da, "block_bottomJs"), "extraBottomJs" => array(__TwigTemplate_4efd4701086b5bbbfbba3e63e2148b044c01a352aa2bed5255469320f17ec1da, "block_extraBottomJs"), "content" => array(__TwigTemplate_7683c934653be972173cc399f892a6300d56680399943fc28a98036775c6f34d, "block_content")))
#6
+ /data/sites/web/e-c-sbe/craft/app/vendor/twig/twig/lib/Twig/Template.php(167): __TwigTemplate_1684515eed9a6cf9ffb79b59311c6f12e864fc567eac8ab3dbfb422ccadd74f8->block_body(array("entry" => Craft\EntryModel, "user" => Craft\UserModel, "currentUser" => Craft\UserModel, "craft" => Craft\CraftVariable, ...), array("body" => array(__TwigTemplate_1684515eed9a6cf9ffb79b59311c6f12e864fc567eac8ab3dbfb422ccadd74f8, "block_body"), "bottomJs" => array(__TwigTemplate_4efd4701086b5bbbfbba3e63e2148b044c01a352aa2bed5255469320f17ec1da, "block_bottomJs"), "extraBottomJs" => array(__TwigTemplate_4efd4701086b5bbbfbba3e63e2148b044c01a352aa2bed5255469320f17ec1da, "block_extraBottomJs"), "content" => array(__TwigTemplate_7683c934653be972173cc399f892a6300d56680399943fc28a98036775c6f34d, "block_content")))
#7
+ /data/sites/web/e-c-sbe/craft/storage/runtime/compiled_templates/80/80a604e9c0f9191d0882f12592d428315276bc5139a7eb60d5a0471c28224baa.php(102): Twig_Template->displayBlock("body", array("entry" => Craft\EntryModel, "user" => Craft\UserModel, "currentUser" => Craft\UserModel, "craft" => Craft\CraftVariable, ...), array("body" => array(__TwigTemplate_1684515eed9a6cf9ffb79b59311c6f12e864fc567eac8ab3dbfb422ccadd74f8, "block_body"), "bottomJs" => array(__TwigTemplate_4efd4701086b5bbbfbba3e63e2148b044c01a352aa2bed5255469320f17ec1da, "block_bottomJs"), "extraBottomJs" => array(__TwigTemplate_4efd4701086b5bbbfbba3e63e2148b044c01a352aa2bed5255469320f17ec1da, "block_extraBottomJs"), "content" => array(__TwigTemplate_7683c934653be972173cc399f892a6300d56680399943fc28a98036775c6f34d, "block_content")))
#8
+ /data/sites/web/e-c-sbe/craft/app/vendor/twig/twig/lib/Twig/Template.php(387): __TwigTemplate_4efd4701086b5bbbfbba3e63e2148b044c01a352aa2bed5255469320f17ec1da->doDisplay(array("entry" => Craft\EntryModel, "user" => Craft\UserModel, "currentUser" => Craft\UserModel, "craft" => Craft\CraftVariable, ...), array("body" => array(__TwigTemplate_1684515eed9a6cf9ffb79b59311c6f12e864fc567eac8ab3dbfb422ccadd74f8, "block_body"), "bottomJs" => array(__TwigTemplate_4efd4701086b5bbbfbba3e63e2148b044c01a352aa2bed5255469320f17ec1da, "block_bottomJs"), "extraBottomJs" => array(__TwigTemplate_4efd4701086b5bbbfbba3e63e2148b044c01a352aa2bed5255469320f17ec1da, "block_extraBottomJs"), "content" => array(__TwigTemplate_7683c934653be972173cc399f892a6300d56680399943fc28a98036775c6f34d, "block_content")))
#9
+ /data/sites/web/e-c-sbe/craft/app/etc/templating/BaseTemplate.php(26): Twig_Template->displayWithErrorHandling(array("entry" => Craft\EntryModel, "user" => Craft\UserModel, "currentUser" => Craft\UserModel, "craft" => Craft\CraftVariable, ...), array("body" => array(__TwigTemplate_1684515eed9a6cf9ffb79b59311c6f12e864fc567eac8ab3dbfb422ccadd74f8, "block_body"), "bottomJs" => array(__TwigTemplate_4efd4701086b5bbbfbba3e63e2148b044c01a352aa2bed5255469320f17ec1da, "block_bottomJs"), "extraBottomJs" => array(__TwigTemplate_4efd4701086b5bbbfbba3e63e2148b044c01a352aa2bed5255469320f17ec1da, "block_extraBottomJs"), "content" => array(__TwigTemplate_7683c934653be972173cc399f892a6300d56680399943fc28a98036775c6f34d, "block_content")))
#10
+ /data/sites/web/e-c-sbe/craft/app/vendor/twig/twig/lib/Twig/Template.php(355): Craft\BaseTemplate->displayWithErrorHandling(array("entry" => Craft\EntryModel, "user" => Craft\UserModel, "currentUser" => Craft\UserModel, "craft" => Craft\CraftVariable, ...), array("body" => array(__TwigTemplate_1684515eed9a6cf9ffb79b59311c6f12e864fc567eac8ab3dbfb422ccadd74f8, "block_body"), "bottomJs" => array(__TwigTemplate_4efd4701086b5bbbfbba3e63e2148b044c01a352aa2bed5255469320f17ec1da, "block_bottomJs"), "extraBottomJs" => array(__TwigTemplate_4efd4701086b5bbbfbba3e63e2148b044c01a352aa2bed5255469320f17ec1da, "block_extraBottomJs"), "content" => array(__TwigTemplate_7683c934653be972173cc399f892a6300d56680399943fc28a98036775c6f34d, "block_content")))
#11
+ /data/sites/web/e-c-sbe/craft/storage/runtime/compiled_templates/76/76fb570d339de61001353339d594478c1219a1ef8f5ce7d5541281bfea844196.php(35): Twig_Template->display(array("entry" => Craft\EntryModel, "user" => Craft\UserModel, "currentUser" => Craft\UserModel, "craft" => Craft\CraftVariable, ...), array("body" => array(__TwigTemplate_1684515eed9a6cf9ffb79b59311c6f12e864fc567eac8ab3dbfb422ccadd74f8, "block_body"), "content" => array(__TwigTemplate_7683c934653be972173cc399f892a6300d56680399943fc28a98036775c6f34d, "block_content")))
#12
+ /data/sites/web/e-c-sbe/craft/app/vendor/twig/twig/lib/Twig/Template.php(387): __TwigTemplate_1684515eed9a6cf9ffb79b59311c6f12e864fc567eac8ab3dbfb422ccadd74f8->doDisplay(array("entry" => Craft\EntryModel, "user" => Craft\UserModel, "currentUser" => Craft\UserModel, "craft" => Craft\CraftVariable, ...), array("body" => array(__TwigTemplate_1684515eed9a6cf9ffb79b59311c6f12e864fc567eac8ab3dbfb422ccadd74f8, "block_body"), "content" => array(__TwigTemplate_7683c934653be972173cc399f892a6300d56680399943fc28a98036775c6f34d, "block_content")))
#13
+ /data/sites/web/e-c-sbe/craft/app/etc/templating/BaseTemplate.php(26): Twig_Template->displayWithErrorHandling(array("entry" => Craft\EntryModel, "user" => Craft\UserModel, "currentUser" => Craft\UserModel, "craft" => Craft\CraftVariable, ...), array("body" => array(__TwigTemplate_1684515eed9a6cf9ffb79b59311c6f12e864fc567eac8ab3dbfb422ccadd74f8, "block_body"), "content" => array(__TwigTemplate_7683c934653be972173cc399f892a6300d56680399943fc28a98036775c6f34d, "block_content")))
#14
+ /data/sites/web/e-c-sbe/craft/app/vendor/twig/twig/lib/Twig/Template.php(355): Craft\BaseTemplate->displayWithErrorHandling(array("entry" => Craft\EntryModel, "user" => Craft\UserModel, "currentUser" => Craft\UserModel, "craft" => Craft\CraftVariable, ...), array("body" => array(__TwigTemplate_1684515eed9a6cf9ffb79b59311c6f12e864fc567eac8ab3dbfb422ccadd74f8, "block_body"), "content" => array(__TwigTemplate_7683c934653be972173cc399f892a6300d56680399943fc28a98036775c6f34d, "block_content")))
#15
+ /data/sites/web/e-c-sbe/craft/storage/runtime/compiled_templates/ef/ef68483640021c461c9f0d53587a31241b074af4e80159c50a1cf3a4565420d1.php(47): Twig_Template->display(array("entry" => Craft\EntryModel, "user" => Craft\UserModel, "currentUser" => Craft\UserModel, "craft" => Craft\CraftVariable, ...), array("content" => array(__TwigTemplate_7683c934653be972173cc399f892a6300d56680399943fc28a98036775c6f34d, "block_content")))
#16
+ /data/sites/web/e-c-sbe/craft/app/vendor/twig/twig/lib/Twig/Template.php(387): __TwigTemplate_7683c934653be972173cc399f892a6300d56680399943fc28a98036775c6f34d->doDisplay(array("entry" => Craft\EntryModel, "user" => Craft\UserModel, "currentUser" => Craft\UserModel, "craft" => Craft\CraftVariable, ...), array("content" => array(__TwigTemplate_7683c934653be972173cc399f892a6300d56680399943fc28a98036775c6f34d, "block_content")))
#17
+ /data/sites/web/e-c-sbe/craft/app/etc/templating/BaseTemplate.php(26): Twig_Template->displayWithErrorHandling(array("entry" => Craft\EntryModel, "user" => Craft\UserModel, "currentUser" => Craft\UserModel, "craft" => Craft\CraftVariable, ...), array("content" => array(__TwigTemplate_7683c934653be972173cc399f892a6300d56680399943fc28a98036775c6f34d, "block_content")))
#18
+ /data/sites/web/e-c-sbe/craft/app/vendor/twig/twig/lib/Twig/Template.php(355): Craft\BaseTemplate->displayWithErrorHandling(array("entry" => Craft\EntryModel, "user" => Craft\UserModel, "currentUser" => Craft\UserModel, "craft" => Craft\CraftVariable, ...), array("content" => array(__TwigTemplate_7683c934653be972173cc399f892a6300d56680399943fc28a98036775c6f34d, "block_content")))
#19
+ /data/sites/web/e-c-sbe/craft/app/vendor/twig/twig/lib/Twig/Template.php(366): Twig_Template->display(array("entry" => Craft\EntryModel))
#20
+ /data/sites/web/e-c-sbe/craft/app/vendor/twig/twig/lib/Twig/Environment.php(347): Twig_Template->render(array("entry" => Craft\EntryModel))
#21
+ /data/sites/web/e-c-sbe/craft/app/services/TemplatesService.php(256): Twig_Environment->render("index", array("entry" => Craft\EntryModel))
#22
+ /data/sites/web/e-c-sbe/craft/app/controllers/BaseController.php(74): Craft\TemplatesService->render("index", array("entry" => Craft\EntryModel))
#23
+ /data/sites/web/e-c-sbe/craft/app/controllers/TemplatesController.php(55): Craft\BaseController->renderTemplate("index", array("entry" => Craft\EntryModel))
#24
unknown(0): Craft\TemplatesController->actionRender("index", array("entry" => Craft\EntryModel))
#25
+ /data/sites/web/e-c-sbe/craft/app/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs(Craft\TemplatesController, array("index", array("entry" => Craft\EntryModel)))
#26
+ /data/sites/web/e-c-sbe/craft/app/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal(Craft\TemplatesController, ReflectionMethod, array("variables" => array("entry" => Craft\EntryModel), "template" => "index"))
#27
+ /data/sites/web/e-c-sbe/craft/app/framework/web/CController.php(308): CInlineAction->runWithParams(array("variables" => array("entry" => Craft\EntryModel), "template" => "index"))
#28
+ /data/sites/web/e-c-sbe/craft/app/framework/web/CController.php(286): CController->runAction(CInlineAction)
#29
+ /data/sites/web/e-c-sbe/craft/app/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array())
#30
+ /data/sites/web/e-c-sbe/craft/app/framework/web/CWebApplication.php(282): CController->run("render")
#31
+ /data/sites/web/e-c-sbe/craft/app/framework/web/CWebApplication.php(141): CWebApplication->runController("templates/render")
#32
+ /data/sites/web/e-c-sbe/craft/app/etc/web/WebApp.php(290): CWebApplication->processRequest()
#33
+ /data/sites/web/e-c-sbe/craft/app/framework/base/CApplication.php(185): Craft\WebApp->processRequest()
#34
+ /data/sites/web/e-c-sbe/craft/app/index.php(62): CApplication->run()
#35
+ /data/sites/web/e-c-sbe/www/en/index.php(22): require_once("/data/sites/web/e-c-sbe/craft/app/index.php")
/data/sites/web/e-c-sbe/craft/storage/runtime/compiled_templates/ef/ef68483640021c461c9f0d53587a31241b074af4e80159c50a1cf3a4565420d1.php
. At the top of that file there will be a comment that tell what source template it is. Whatever code you've got around line 161/162 of that template is causing the error.