Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • John P Scott 14 posts 71 karma points
    Mar 31, 2013 @ 12:49
    John P Scott
    0

    ContentService.Move not re-synching with DocumentCache

    Hi,I am having problems getting ContentService.Move to re-sync content for web site users. I am running code which calls ContentService.Move to archive obsolete nodes under an archive node. The code works and the back-office view will show the moved nodes in their new location, however, website users still see the original content. Strangely, if I use the back office to move just one of the moved nodes manually to the same  location, all of the moved nodes 'magically' disappear from the website users view. My code does attempt to update the cache - a trimmed version of the code is shown below:var rootOfContent = 1234; var expiredContent = from content in contentService.GetDescendants(rootOfContent) where content.GetValue<DateTime>("closingDate") < DateTime.Now.Date select content;var archiveNode = 2345;foreach (var expired in expiredContent){  contentService.Move(expired, GetMonthHolderId(expired));  library.UpdateDocumentCache(expired.Id);}I've also tried 'contentService.SaveAndPublish()' after the .Move() call but it still does not work. Even a restart of IIS does not have any effect.Any clues please?JohnP.S. Sorry the code isn't formatted but I can't get my mouse to work with the topic html editor under Windows 8 and I don't know if there are keyboard shortcuts to get the 'code' format from the toolbar.

Please Sign in or register to post replies

Write your reply to:

Draft