Update html placeholder problem
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 > Update html placeholder problem




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

    Update html placeholder problem  
Ismail Mayat


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


 
12-23-05 12:49 PM

Hello all,

I have a problem with a .net windows app that I have written.  I am using
win xp mcms2002 sp1 and .net.  My application loops through all channels /
postings and html placeholders.  When it encounters html placeholder I am
using html tidy and some xsls to clean up the content.

I clean the content save back to html placeholder.  Submit , approve and
commit.  I do not get any errors the content is definately saving to the cms
repository becuase when i test a clean posting my retriveing it using my
windows application i can see that the originally word created content does
not have any word formatting in it.

The issue is that when i navigate to website I am still seeing old content.
I have tried clearing the cms cache to no avail.

The snippets of code below detail some of things that I am doing in the
application


this is how i am creating cms application context as you can see i have
selected update mode

CmsApplicationContext oCMS = new CmsApplicationContext();
oCMS. AuthenticateAsUser(sUser,sPass,Publishin
gMode.Update);

when processing posting i loop through postings placeholders and test if its
html then as per code below cast it to htmlplaceholder


HtmlPlaceholder oHtmlPh = objPH as HtmlPlaceholder;
string strHTML = oHtmlPh.Html;

strHTML =cleanUp(strHTML) //remove word and stlyes using html tidy

oHtmlPh.Html = strHTML;

In another function after processing all the html placeholders for a given
posting i do


if (objPostTosave.CanSubmit)
{
Logger.Debug("submitting " + objPostTosave.DisplayName);
objPostTosave.Submit();
// Do not forget to commit your changes back to CMS.
_objMCMSDAL.CMS.CommitAll();
Logger.Debug("submitted");
}
if (objPostTosave.State == PostingState.WaitingForEditorApproval)
{
Logger.Debug("Approving " + objPostTosave.DisplayName);
objPostTosave.Approve();
_objMCMSDAL.CMS.CommitAll();
Logger.Debug("approved");
}
if (objPostTosave.State == PostingState.WaitingForModeratorApproval)
{
Logger.Debug("By passing waiting for moderator for posting " +
objPostTosave.DisplayName);
objPostTosave.Approve();
_objMCMSDAL.CMS.CommitAll();
Logger.Debug("approved");
}



Any one any suggestions??








[ Post a follow-up to this message ]



    Re: Update html placeholder problem  
Stefan [MSFT]


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


 
12-23-05 12:49 PM

Hi Ismail,

do you have ASP.NET output caching implemented?
Then you need to wait till the cache is expired.

Also check if the time on the SQL server and the MCMS server is
synchronized.

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


"Ismail Mayat" <IsmailMayat@discussions.microsoft.com> wrote in message
news:56163AD6-886E-4209-9310-1D1A6CFFBEC8@microsoft.com...
> Hello all,
>
> I have a problem with a .net windows app that I have written.  I am using
> win xp mcms2002 sp1 and .net.  My application loops through all channels /
> postings and html placeholders.  When it encounters html placeholder I am
> using html tidy and some xsls to clean up the content.
>
> I clean the content save back to html placeholder.  Submit , approve and
> commit.  I do not get any errors the content is definately saving to the
> cms
> repository becuase when i test a clean posting my retriveing it using my
> windows application i can see that the originally word created content
> does
> not have any word formatting in it.
>
> The issue is that when i navigate to website I am still seeing old
> content.
> I have tried clearing the cms cache to no avail.
>
> The snippets of code below detail some of things that I am doing in the
> application
>
>
> this is how i am creating cms application context as you can see i have
> selected update mode
>
> CmsApplicationContext oCMS = new CmsApplicationContext();
> oCMS. AuthenticateAsUser(sUser,sPass,Publishin
gMode.Update);
>
> when processing posting i loop through postings placeholders and test if
> its
> html then as per code below cast it to htmlplaceholder
>
>
> HtmlPlaceholder oHtmlPh = objPH as HtmlPlaceholder;
> string strHTML = oHtmlPh.Html;
>
> strHTML =cleanUp(strHTML) //remove word and stlyes using html tidy
>
> oHtmlPh.Html = strHTML;
>
> In another function after processing all the html placeholders for a given
> posting i do
>
>
> if (objPostTosave.CanSubmit)
> {
> Logger.Debug("submitting " + objPostTosave.DisplayName);
> objPostTosave.Submit();
> // Do not forget to commit your changes back to CMS.
> _objMCMSDAL.CMS.CommitAll();
> Logger.Debug("submitted");
> }
> if (objPostTosave.State == PostingState.WaitingForEditorApproval)
> {
> Logger.Debug("Approving " + objPostTosave.DisplayName);
> objPostTosave.Approve();
> _objMCMSDAL.CMS.CommitAll();
> Logger.Debug("approved");
> }
> if (objPostTosave.State == PostingState.WaitingForModeratorApproval)
> {
> Logger.Debug("By passing waiting for moderator for posting " +
> objPostTosave.DisplayName);
> objPostTosave.Approve();
> _objMCMSDAL.CMS.CommitAll();
> Logger.Debug("approved");
> }
>
>
>
> Any one any suggestions??
>
>
>







[ Post a follow-up to this message ]



    RE: Update html placeholder problem  
Ismail Mayat


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


 
12-23-05 12:49 PM

Stefan,

With regards to caching on dev site its not enabled ie the global.asx.cs
does not inherit from CmsHttpContext.  Also in the template files there are
no caching directives.

With regards to to time syncronisation im not to sure how to check. However
I do have a server with db and mcms on the same server called hq_server_04.
I also have another mcms dev install on my local pc which points to db on
hq_server_04.

Also with regards to caching would restarting server /pc and clearing the
cache using sca not mean that cache is cleared.

Many thanks .





[ Post a follow-up to this message ]



    Re: Update html placeholder problem  
Stefan [MSFT]


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


 
12-23-05 12:49 PM

Hi Ismail,

clicking the clear cache button only clears the MCMS Node cache.
Not any other caches.
Your problem is strange and you should open a 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
----------------------


"Ismail Mayat" <IsmailMayat@discussions.microsoft.com> wrote in message
news:C88623F0-B3A6-4333-B580-DFB625E2C9C6@microsoft.com...
> Stefan,
>
> With regards to caching on dev site its not enabled ie the global.asx.cs
> does not inherit from CmsHttpContext.  Also in the template files there
> are
> no caching directives.
>
> With regards to to time syncronisation im not to sure how to check.
> However
> I do have a server with db and mcms on the same server called
> hq_server_04.
> I also have another mcms dev install on my local pc which points to db on
> hq_server_04.
>
> Also with regards to caching would restarting server /pc and clearing the
> cache using sca not mean that cache is cleared.
>
> Many thanks .







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:30 PM.      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