I have just installed v2.3.2 on XAMPP for Windows Version 1.7.1 and after logging into CMS instead of the site editor I got this warning screen (below). If someone can help me to get round this problem I would really appreciate it as I would love to improve my current website.
[Warning] Invalid argument supplied for foreach()
GET /SilverStripe/admin/
Line 174 in C:\xampp\htdocs\SilverStripe\sapphire\core\model\Hierarchy.php
Source
165 }
166 }
167
168 /**
169 * Ensure marked nodes that have children are also marked expanded.
170 * Call this after marking but before iterating over the tree.
171 */
172 protected function markingFinished() {
173 // Mark childless nodes as expanded.
174 foreach($this->markedNodes as $id => $node) {
175 if(!$node->isExpanded() && !$node->numChildren()) {
176 $node->markExpanded();
177 }
178 }
179 }
180
Trace
* Hierarchy->markingFinished()
* call_user_func_array(Array,Array)
Line 489 of Object.php
* Object->__call(markingFinished,Array)
* Forum->markingFinished()
Line 286 of Forum.php
* Forum->getChildrenAsUL(, "<li id=\"record-$child->ID\" class=\"" . $child->CMSTreeClasses($extraArg) . "\">" . "<a href=\"" . Director::link(substr($extraArg->Link(),0,-1), "show", $child->ID) . "\" class=\"" . $child->CMSTreeClasses($extraArg) . "\" title=\"Page type: ".$child->class."\" >" . ($child->TreeTitle()) . "</a>" ,CMSMain,1,AllChildrenIncludingDeleted,)
Line 56 of Hierarchy.php
* Hierarchy->getChildrenAsUL(, "<li id=\"record-$child->ID\" class=\"" . $child->CMSTreeClasses($extraArg) . "\">" . "<a href=\"" . Director::link(substr($extraArg->Link(),0,-1), "show", $child->ID) . "\" class=\"" . $child->CMSTreeClasses($extraArg) . "\" title=\"Page type: ".$child->class."\" >" . ($child->TreeTitle()) . "</a>" ,CMSMain,1,AllChildrenIncludingDeleted,)
* call_user_func_array(Array,Array)
Line 489 of Object.php
* Object->__call(getChildrenAsUL,Array)
* ForumHolder->getChildrenAsUL(, "<li id=\"record-$child->ID\" class=\"" . $child->CMSTreeClasses($extraArg) . "\">" . "<a href=\"" . Director::link(substr($extraArg->Link(),0,-1), "show", $child->ID) . "\" class=\"" . $child->CMSTreeClasses($extraArg) . "\" title=\"Page type: ".$child->class."\" >" . ($child->TreeTitle()) . "</a>" ,CMSMain,1,AllChildrenIncludingDeleted,)
Line 56 of Hierarchy.php
* Hierarchy->getChildrenAsUL(, "<li id=\"record-$child->ID\" class=\"" . $child->CMSTreeClasses($extraArg) . "\">" . "<a href=\"" . Director::link(substr($extraArg->Link(),0,-1), "show", $child->ID) . "\" class=\"" . $child->CMSTreeClasses($extraArg) . "\" title=\"Page type: ".$child->class."\" >" . ($child->TreeTitle()) . "</a>" ,CMSMain,1,AllChildrenIncludingDeleted)
* call_user_func_array(Array,Array)
Line 489 of Object.php
* Object->__call(getChildrenAsUL,Array)
* SiteTree->getChildrenAsUL(, "<li id=\"record-$child->ID\" class=\"" . $child->CMSTreeClasses($extraArg) . "\">" . "<a href=\"" . Director::link(substr($extraArg->Link(),0,-1), "show", $child->ID) . "\" class=\"" . $child->CMSTreeClasses($extraArg) . "\" title=\"Page type: ".$child->class."\" >" . ($child->TreeTitle()) . "</a>" ,CMSMain,1,AllChildrenIncludingDeleted)
Line 523 of LeftAndMain.php
* LeftAndMain->getSiteTreeFor(SiteTree)
Line 160 of CMSMain.php
* CMSMain->SiteTreeAsUL()
* call_user_func_array(Array,Array)
Line 408 of ViewableData.php
* ViewableData->XML_val(SiteTreeAsUL,,1)
Line 294 of .cacheC..xampp.htdocs.SilverStripe.cms.templates.Includes.CMSMain_left.ss
* include(C:\Documents and Settings\Owner\Local Settings\Temp\silverstripe-cacheC--xampp-htdocs-SilverStripe\.cacheC..xampp.htdocs.SilverStripe.cms.templates.Includes.CMSMain_left.ss)
Line 354 of SSViewer.php
* SSViewer->process(CMSMain)
Line 773 of ViewableData.php
* ViewableData->renderWith(Array)
Line 480 of LeftAndMain.php
* LeftAndMain->Left()
* call_user_func_array(Array,Array)
Line 408 of ViewableData.php
* ViewableData->XML_val(Left,,1)
Line 59 of .cacheC..xampp.htdocs.SilverStripe.cms.templates.LeftAndMain.ss
* include(C:\Documents and Settings\Owner\Local Settings\Temp\silverstripe-cacheC--xampp-htdocs-SilverStripe\.cacheC..xampp.htdocs.SilverStripe.cms.templates.LeftAndMain.ss)
Line 354 of SSViewer.php
* SSViewer->process(CMSMain)
Line 175 of Controller.php
* Controller->handleAction(HTTPRequest)
Line 129 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 122 of Controller.php
* Controller->handleRequest(HTTPRequest)
Line 277 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
* Director::direct(/admin/)
Line 118 of main.php