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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

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

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

Error when deleting pages from published site


Go to End


2 Posts   1591 Views

Avatar
poseydozer

Community Member, 8 Posts

18 September 2007 at 2:48am

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.

Avatar
Andante

Community Member, 231 Posts

18 September 2007 at 9:52am

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