Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.


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

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

Error when deleting pages from published site


2 Posts   1278 Views


18 September 2007 at 2:48am Community Member, 8 Posts

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

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.


18 September 2007 at 9:52am 230 Posts

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);