My Development Blog

My Development experiences

Archive for October, 2013

Kentico – Pages losing content on refresh?

Posted by ipwright83 on October 30, 2013

Being fairly new to Kentico I hadn’t used the built in workflow system before. I picked up a solution that it had been enabled on and quickly got the hang of it. There’s a little toolbox available to you when you’ve got a document selected. To publish a change you simply need to submit the item for approval:

publish

Then you can publish it:

submit

Nice and straight forward. However when you’re not used to it you can sometimes forget, which can lead to some behaviours that seem really strange at first. What I’d find is that my item on the first load had some content (name, description, image) for example. I’d make a change to my JavaScript or one of the ASPX files, refresh, and suddenly all my content had gone. This was quite baffling.

content

The reason this happens, is because on the first load you are using Kentico’s Preview mode. This allows you to see the current content in Kentico that hasn’t yet been published. If however you refresh your page then Kentico switches to the live mode, which doesn’t show unpublished information. Therefore if you forget to publish your changes to a document (images and the like) then you’ll see a different view between initial load and refresh.

NoContent

Quite bizarre at first. To avoid it simply remember to publish your changes or turn off workflow while your developing. To do this:

1) Open Kentico’s SiteManager by browsing to http://hostname/CMSSiteManager
2) Select the Workflows Option in the tree on the left
3) Select the Workflow you want to modify and click the edit pencil
4) Click the Scope option
5) Modify the condition in the advanced section to something that won’t match for example ‘0=1’

Advertisements

Posted in Kentico | Leave a Comment »