Jump to:

23553 Posts in 19380 Topics by 2892 members

General Questions

SilverStripe Forums » General Questions » Error - publishing all pages

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 829 Views
  • borriej
    Avatar
    Community Member
    267 Posts

    Error - publishing all pages Link to this post

    Hello,

    Im trying to publish all my page by accessing the url: www.url.com/admin/publishall

    When i hit the publish all button i get the following error:

    [Warning] Invalid argument supplied for foreach()
    POST /sapphire/main.php?url=/admin/publishall&

    Line 1247 in C:\Inetpub\vhosts\....\httpdocs\cms\code\CMSMain.php
    Source

    1238       
    1239       $response = "";
    1240
    1241       if(isset($this->requestParams['confirm'])) {
    1242          $start = 0;
    1243          $pages = DataObject::get("SiteTree", "", "", "", "$start,30");
    1244          $count = 0;
    1245          if($pages){
    1246             while(true) {
    1247                foreach($pages as $page) {
    1248                   if($page && !$page->canPublish()) return Security::permissionFailure($this);
    1249                   
    1250                   $page->doPublish();
    1251                   $page->destroy();
    1252                   unset($page);
    1253                   $count++;

    Trace

    * CMSMain->publishall(SS_HTTPRequest)
    Line 193 of Controller.php
    * Controller->handleAction(SS_HTTPRequest)
    Line 137 of RequestHandler.php
    * RequestHandler->handleRequest(SS_HTTPRequest)
    Line 147 of Controller.php
    * Controller->handleRequest(SS_HTTPRequest)
    Line 281 of Director.php
    * Director::handleRequest(SS_HTTPRequest,Session)
    Line 124 of Director.php
    * Director::direct(/admin/publishall)
    Line 127 of main.php

    Why?
    and what to do?

    829 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.