Url Replacement in HTMLplaceholder results ?nrmode=unpublished url
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > Url Replacement in HTMLplaceholder results ?nrmode=unpublished url




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Url Replacement in HTMLplaceholder results ?nrmode=unpublished url  
Danny Hille


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-25-05 12:48 PM

Hi I Have a robot (a aspx page running from a sheduled task, auth. as
administrator)
that replaces a all profane language (from a banned word list)
that works ok ... except that all MCMS urls are replaced with
?nrmode=unpublished urls ????

in short the code looks like this:


CmsApplicationContext Cac = null;
try
{
Cac =new CmsApplicationContext();
Cac. AuthenticateAsCurrentUser(PublishingMode
.Update);
Posting Pos = Cac.Searches.GetByGuid(pguid)as Posting;
for(int i=0;i<Pos.Placeholders.Count;i++)
{
if()
Pos.Placeholders[i].Datasource.RawContent =
ReplaceBannedWords(Pos.Placeholders[i].Datasource.RawContent);
}
if(Pos.CanSubmit)Pos.Submit();
if(Pos.CanApprove)Pos.Approve();
Cac.CommitAll();
}
catch(Exception Exc)
{
Response.Write(Exc.ToString());
}
finally
{
if(Cac!=null)Cac.Dispose();
}


Thanks in advance
Danny Hille





[ Post a follow-up to this message ]



    Re: Url Replacement in HTMLplaceholder results ?nrmode=unpublished url  
Stefan [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-26-05 12:53 PM

Hi Danny,

never ever use datasource.rawcontent.
See here for explanation:
http://blogs.technet.com/stefan_gos.../24/119546.aspx

Check if this solves the problem.

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


"Danny Hille" <DannyHille@discussions.microsoft.com> wrote in message
news:5B6125F0-012C-4D6C-A4D0-2810F7C82C5B@microsoft.com...
> Hi I Have a robot (a aspx page running from a sheduled task, auth. as
> administrator)
> that replaces a all profane language (from a banned word list)
> that works ok ... except that all MCMS urls are replaced with
> ?nrmode=unpublished urls ????
>
> in short the code looks like this:
>
>
> CmsApplicationContext Cac = null;
> try
> {
> Cac =new CmsApplicationContext();
> Cac. AuthenticateAsCurrentUser(PublishingMode
.Update);
> Posting Pos = Cac.Searches.GetByGuid(pguid)as Posting;
> for(int i=0;i<Pos.Placeholders.Count;i++)
> {
> if()
> Pos.Placeholders[i].Datasource.RawContent =
> ReplaceBannedWords(Pos.Placeholders[i].Datasource.RawContent);
> }
> if(Pos.CanSubmit)Pos.Submit();
> if(Pos.CanApprove)Pos.Approve();
> Cac.CommitAll();
> }
> catch(Exception Exc)
> {
> Response.Write(Exc.ToString());
> }
> finally
> {
> if(Cac!=null)Cac.Dispose();
> }
>
>
> Thanks in advance
> Danny Hille







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:28 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register