Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Opening CMS interface

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 4418 Views
  • KiwiJeff
    Avatar
    Community Member
    2 Posts

    Opening CMS interface Link to this post

    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

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Opening CMS interface Link to this post

    Hrm, I've never seen that error before, which is a bit weird. But here's how to fix it:

    Change this line:

    foreach($this->markedNodes as $id => $node) {

    To this:

    if($this->markedNodes) foreach($this->markedNodes as $id => $node) {

  • KiwiJeff
    Avatar
    Community Member
    2 Posts

    Re: Opening CMS interface Link to this post

    Thank you Sam for the suggestion.

    After my post I discovered that it was the Forum module that was at fault, it was version o.1. I had included both the blog and forum modules in the initial install. So I reinstall SilverStripe without the Forum module and had no problems starting the CMS. I'll now download the latest version of the Blog and Forum and have a play. I am looking forward to seeing what I can develop.

    Again thanks.

    4418 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.