Forum
Blog Draft not working correctly - Cannot preview drafts
Hi,
I have an issue - when setting the status of a blog post to "draft" the preview button takes to the correct page, but the page does not show the blog.
The following is my code for displaying the specific blog
$blogPost = perch_blog_custom(array(
'filter' => 'postSlug',
'match' => 'eq',
'value' => perch_get('s'),
'section' => 'posts',
'template' => 'post.html'
), true);
echo $blogPost;
This displays blogs correctly, but does not show drafts (I am correctly logged into perch).
Any ideas?
I have also attempted to use perch_blog_check_preview, but no luck.
perch_blog_check_preview()
is called internally, you don't need to call it yourself.If you turn debug on, what does it output on the preview page?
Ok.
I'm not sure if there is an issue with perch_blog_check_preview();
If I call it, nothing works, however I can get it to work by calling part of the perch_blog_check_preview() function manually:
So possibly an issue surrounding the PERCH_PREVIEW_ARG variable, I'll have a look at the debug and see if I can troubleshoot the preview_arg once I get on my own machine.
Can you post your diagnostics report?