| Author |
Message |
Herman Nijland
Guest
|
Posted:
Mon Nov 14, 2005 9:50 am Post subject:
CMS delays when deleting channels with subchannels |
|
|
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;
}
} |
|
| Back to top |
|
 |
Stefan [MSFT]
Guest
|
Posted:
Mon Nov 14, 2005 9:50 am Post subject:
Re: CMS delays when deleting channels with subchannels |
|
|
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...
| Quote: | 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;
}
} |
|
|
| Back to top |
|
 |
Stefan [MSFT]
Guest
|
Posted:
Mon Nov 14, 2005 1:50 pm Post subject:
Re: CMS delays when deleting channels with subchannels |
|
|
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...
| Quote: | 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. |
|
|
| Back to top |
|
 |
Herman Nijland
Guest
|
Posted:
Mon Nov 14, 2005 1:50 pm Post subject:
Re: CMS delays when deleting channels with subchannels |
|
|
Stefan [MSFT] wrote:
| Quote: | 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. |
|
| Back to top |
|
 |
Stefan [MSFT]
Guest
|
Posted:
Mon Nov 14, 2005 1:50 pm Post subject:
Re: CMS delays when deleting channels with subchannels |
|
|
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...
| Quote: | 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 |
|
|
| Back to top |
|
 |
Herman Nijland
Guest
|
Posted:
Mon Nov 14, 2005 1:50 pm Post subject:
Re: CMS delays when deleting channels with subchannels |
|
|
Stefan [MSFT] wrote:
| Quote: | 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 |
|
| Back to top |
|
 |
|
|
|
|