|
Home > Archive > Microsoft Content Management Server > November 2005 > CMS delays when deleting channels with subchannels
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
CMS delays when deleting channels with subchannels
|
|
| Herman Nijland 2005-11-14, 7:48 am |
| L.S.
We have a real nasty problem with users deleting channels with subchannels.
In short:
We added a 'Delete Channel' option to the user console, available to
Channel Managers. This works ok for channels without subchannels, and
cms nicely returns to the parent channel.
When users delete a channel with subchannels something weird happens.
The subchannels are deleted, but when cms returns to the parent channel
it doesn't display the content, but it returns with a 'The page cannot
be found' error. So, somehow the parent channel gets messed up when
deleting a subchannel, but only for a while - after a timespan of an
hour to a day the channel returns.
It sometimes helps to start Site Manager and access the channel, but not
always.. wild ideas welcome!
Thanks in advance,
Herman
P.S. the code for the 'Delete Channel' routine:
public string DeleteChannel(Channel thisChannel)
{
if (thisChannel != _cContext.RootChannel)
{
Channel returnChannel = thisChannel.Parent;
deleteChannelContent(thisChannel);
return returnChannel.Url + _
"&WBCMODE=PresentationUnpublished&wbc_purpose=Basic";
}
else
{
return thisChannel.Url + _
"&WBCMODE=PresentationUnpublished&wbc_purpose=Basic";
}
}
private void deleteChannelContent(Channel thisChannel)
{
try
{
foreach (Posting delposting in thisChannel.Postings)
{
delposting.Delete();
}
foreach (Channel subChannel in thisChannel.Channels)
{
deleteChannelContent(subChannel);
}
thisChannel.Delete();
_cContext.CommitAll();
}
catch
{
_cContext.RollbackAll();
throw;
}
}
| |
| Stefan [MSFT] 2005-11-14, 7:48 am |
| Hi Herman,
please test if the problem is resolved if you do a Commit action after each
delete.
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
Check out the new book as well: Advanced MCMS development:
http://tinyurl.com/8ugwj
----------------------
"Herman Nijland" <hipponl@yahoo.com> wrote in message
news:uLvfK%23P6FHA.3616@TK2MSFTNGP10.phx.gbl...
> L.S.
> We have a real nasty problem with users deleting channels with
> subchannels.
> In short:
> We added a 'Delete Channel' option to the user console, available to
> Channel Managers. This works ok for channels without subchannels, and cms
> nicely returns to the parent channel.
> When users delete a channel with subchannels something weird happens. The
> subchannels are deleted, but when cms returns to the parent channel it
> doesn't display the content, but it returns with a 'The page cannot be
> found' error. So, somehow the parent channel gets messed up when deleting
> a subchannel, but only for a while - after a timespan of an hour to a day
> the channel returns.
> It sometimes helps to start Site Manager and access the channel, but not
> always.. wild ideas welcome!
>
> Thanks in advance,
> Herman
>
> P.S. the code for the 'Delete Channel' routine:
> public string DeleteChannel(Channel thisChannel)
> {
> if (thisChannel != _cContext.RootChannel)
> {
> Channel returnChannel = thisChannel.Parent;
> deleteChannelContent(thisChannel);
> return returnChannel.Url + _
> "&WBCMODE=PresentationUnpublished&wbc_purpose=Basic";
> }
> else
> {
> return thisChannel.Url + _
> "&WBCMODE=PresentationUnpublished&wbc_purpose=Basic";
> }
> }
>
> private void deleteChannelContent(Channel thisChannel)
> {
> try
> {
> foreach (Posting delposting in thisChannel.Postings)
> {
> delposting.Delete();
> }
> foreach (Channel subChannel in thisChannel.Channels)
> {
> deleteChannelContent(subChannel);
> }
> thisChannel.Delete();
> _cContext.CommitAll();
> }
> catch
> {
> _cContext.RollbackAll();
> throw;
> }
> }
| |
| Herman Nijland 2005-11-14, 7:48 am |
| Stefan [MSFT] wrote:
> Hi Herman,
>
> please test if the problem is resolved if you do a Commit action after each
> delete.
>
> Cheers,
> Stefan
>
Hello Stefan,
Just tried that (currentcontext.CommitAll after each delete), but alas.. same
results.
Cheers, Herman
| |
| Stefan [MSFT] 2005-11-14, 7:48 am |
| Hi Herman,
then you should open support case for this.
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
Check out the new book as well: Advanced MCMS development:
http://tinyurl.com/8ugwj
----------------------
"Herman Nijland" <hipponl@yahoo.com> wrote in message
news:eaEQaKQ6FHA.476@TK2MSFTNGP15.phx.gbl...
> Stefan [MSFT] wrote:
>
> Hello Stefan,
> Just tried that (currentcontext.CommitAll after each delete), but alas..
> same results.
>
> Cheers, Herman
| |
| Herman Nijland 2005-11-14, 7:48 am |
| Stefan [MSFT] wrote:
> Hi Herman,
>
> then you should open support case for this.
>
> Cheers,
> Stefan
>
Ok, will do.
Thanks a lot for your input,
Herman
P.S. I'll post the solution back to the newsgroup.
| |
| Stefan [MSFT] 2005-11-14, 7:48 am |
| That would be helpful!
Thanks!
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
Check out the new book as well: Advanced MCMS development:
http://tinyurl.com/8ugwj
----------------------
"Herman Nijland" <hipponl@yahoo.com> wrote in message
news:Oc420mR6FHA.2816@tk2msftngp13.phx.gbl...
> Stefan [MSFT] wrote:
>
> Ok, will do.
> Thanks a lot for your input,
> Herman
> P.S. I'll post the solution back to the newsgroup.
|
|
|
|
|