Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Error when deleting pages from published site

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: 1222 Views
  • poseydozer
    Avatar
    Community Member
    8 Posts

    Error when deleting pages from published site Link to this post

    Hi, I get the following error when I try to delete a page from the published site:

    expression
    Notice: Undefined variable: descendantsRemoved in /opt/lampp/htdocs/current_mita_site/mita/cms/code/CMSMain.php on line 407

    Notice: Undefined variable: descRemoved in /opt/lampp/htdocs/current_mita_site/mita/cms/code/CMSMain.php on line 413
    var node = $('sitetree').getTreeNodeByIdx(25); if(node && node.parentTreeNode) node.parentTreeNode.removeTreeNode(node); $('Form_EditForm').closeIfSetTo(25); var node = $('sitetree').getTreeNodeByIdx(25); if(node && node.parentTreeNode) node.parentTreeNode.removeTreeNode(node); $('Form_EditForm').closeIfSetTo(25); statusMessage('Deleted \'New ForumPage\' from live site', 'good');

    If I add the following line to CMS/code/CMSMain.php at the top of the function "deletefromlive($urlParams, $form)", the problem goes away:

    $descendantsRemoved = 0;

    I'm not an experienced php programmer, so...

    I am using Silverstripe v 2.0.2b.

  • Andy
    Avatar
    230 Posts

    Re: Error when deleting pages from published site Link to this post

    Thanks, I've changed this in svn.

    You can disable warning like this by having the following line in your _config.php

    error_reporting(E_ALL ^ E_NOTICE);

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