Hi there,
One of our clients posted an entry today but cannot get it to show up on a detail template. It will show up in the listing pages just fine, but when you click through and either the {url_title} or {entry_id} is passed along, it just goes to a 404 (which is in our {if no_results} condition).
Here is my template, if that helps. I’ve also tried setting entry_id manually in the weblog:entries tag, no luck. The entry status is open, so that should be good. Any ideas for things to try?
{embed="includes/document_head" title="Tufts Alumni - News"}
{exp:weblog:entries weblog="news" status="not closed" limit="1" disable="categories|member_data|trackbacks|pagination" require_entry="yes" dynamic="on"}
{if no_results}{redirect="404"}{/if}
<body {if generic_callouts}{if:else}class="no-callout"{/if}>
{embed="includes/header"}
<div id="content">
<div id="content-outer">
<div id="page-title">
<h1>{embed="/includes/_get_page_title" segment="{segment_1}"}</h1>
</div>
<div id="content-inner">
{embed="includes/navigation" special-link="<a class='arrow-link-right' href='#'>Share a Story Idea</a>"}
<div id="content-main">
{if segment_4 == "comment"}
<h2>{title}</h2>
<p> </p><h3>Post a Comment</h3>
<p> <br />
{exp:comment:form weblog="news"}<br />
{if logged_out}<br />
<br />
Name: <input type="text" name="name" value="{name}" size="50" /></p><br />
Email: <input type="text" name="email" value="{email}" size="50" /></p><br />
Location: <input type="text" name="location" value="{location}" size="50" /></p><br />
URL: <input type="text" name="url" value="{url}" size="50" /></p><br />
{/if}<br />
<input type="hidden" name="RET" value="/news/detail/{segment_3}/comment-submitted" /><br />
<textarea name="comment" cols="70" rows="10">{comment}</textarea></p><br />
<input type="checkbox" name="save_info" value="yes" {save_info} /> Remember my personal information<br />
<input type="checkbox" name="notify_me" value="yes" {notify_me} /> Notify me of follow-up comments?<br />
{if captcha}<br />
<br />
<label for="captcha">Please enter the word you see in the image below:</label></p>
<p> {captcha}</p>
<p> <input type="text" name="captcha" value="{captcha_word}" id="captcha" maxlength="20" /><br />
<br />
{/if}<br />
<input type="submit" name="submit" value="Submit" /><br />
<input type="submit" name="preview" value="Preview" /><br />
<div class="grey-hr clear"></div><br />
<a href="http://{path=%27/news/detail/{segment_3}%27}%22class=%22brown" class="brown interest-form">Back to Article</a><br />
{/exp:comment:form}<br />
{if:else}<br />
<br />
{news_main_image limit="1"}<br />
<div class="image-right"><br />
{exp:imgsizer:size src="{news_main_image_file}" width="200" alt="{news_main_image_file}"}<br />
{news_main_image_caption}<br />
</div><br />
{/news_main_image}<br />
{if segment_4 == 'comment-submitted'}<em>Your comment has been submitted.</em>{/if}<br />
<a href="/news/archive">Back to news</a><br />
</p><h2>{title}</h2><p> <br />
<em>{entry_date format="%F %d, %Y"}</em><br />
{news_body}<br />
{embed="/news/comments"}<br />
<div class="clear grey-hr"></div><br />
<a href="/news/detail/{segment_3}/comment%22class=%22brown" class="brown interest-form">Post a Comment</a><br />
<br />
{/if}<br />
</div> <!-- #content-main --><br />
<div class="clear"></div><br />
</div><br />
</div><br />
{embed="includes/footer"}<br />
</body><br />
{/exp:weblog:entries}<br />
</html>