<p>My understanding is you have to save an entry first before you can use live preview.</p>

<p>Brandon says as much in his answer here as well:<br>
<a href="https://craftcms.stackexchange.com/a/12091/103">https://craftcms.stackexchange.com/a/12091/103</a> </p>

CC BY-SA 3.0
2016-06-03T05:07:18.163Z
Thanks for the link. What is odd though is that in Brandon's answer he says it does not matter if the entry is enabled or not. However, if I save and disable the entry, the same behaviour takes place. If I enable the entry then the live preview is fine again.
Mike
CC BY-SA 3.0
2016-06-03T05:09:07.467Z
It could be something in your template code that is explicitly hiding disabled entries?? Or perhaps a bug.
Anna_MediaGirl
CC BY-SA 3.0
2016-06-08T02:57:33.600Z
Well in testing this more, it seems that when the entry is in disabled mode, the preview always loads the most recent enabled entry - regardless of what section that is from. I cannot see anything else that would prevent this in my template code but that behaviour makes me wonder about how I'm retrieving the entry: {% set entry = craft.entries({ slug: craft.request.getLastSegment() }).first() %}
Mike
CC BY-SA 3.0
2016-06-01T22:33:31.287Z
2016-06-01T22:33:31.287Z
2017-04-13T12:50:59.930Z
Anna_MediaGirl
<p>We have a site where Live Preview only works with entries that have been previously published. When trying to preview entries we're working on (or drafts), we see either the latest entry for that section instead - or sometimes the correct entry template but with other/missing data in it.</p>

<p>Puzzled as to what is going on. There are no console errors.</p>

CC BY-SA 3.0
2016-06-01T21:50:28.593Z
Do you have any Routing which may be affecting it?
Matt P
CC BY-SA 3.0
2016-06-03T05:03:44.177Z
No, I don't. That did occur to me.
Mike
<live-preview>
Live Preview only works with published entries
# Live Preview only works with published entries

(Asked by: username_0 on 2016-06-01)

We have a site where Live Preview only works with entries that have been previously published. When trying to preview entries we're working on (or drafts), we see either the latest entry for that section instead - or sometimes the correct entry template but with other/missing data in it.

Puzzled as to what is going on. There are no console errors.

**Tags:** live-preview

> **Comments:**
> **username_1**: Do you have any Routing which may be affecting it?  
> **username_0**: No, I don't. That did occur to me.  

---

## 1 answers

### Answer by username_2 on 2016-06-01. Score: 2

My understanding is you have to save an entry first before you can use live preview.

Brandon says as much in his answer here as well:  
<https://craftcms.stackexchange.com/a/12091/103>

> **Comments:**
> **username_0**: Thanks for the link. What is odd though is that in Brandon's answer he says it does not matter if the entry is enabled or not. However, if I save and disable the entry, the same behaviour takes place. If I enable the entry then the live preview is fine again.  
> **username_2**: It could be something in your template code that is explicitly hiding disabled entries?? Or perhaps a bug.  
> **username_0**: Well in testing this more, it seems that when the entry is in disabled mode, the preview always loads the most recent enabled entry - regardless of what section that is from. I cannot see anything else that would prevent this in my template code but that behaviour makes me wonder about how I'm retrieving the entry: {% set entry = craft.entries({ slug: craft.request.getLastSegment() }).first() %}  

---

