I have a news bulletins weblog set up, and the following code to display it on the home page of my site:
{exp:weblog:info weblog="news_bulletins"}{blog_title}{/exp:weblog:info}
{exp:weblog:entries weblog="news_bulletins" orderby="date" sort="desc" limit="3" disable="member_data|trackbacks"}
<div class="entry">
<a href="http://{my_template_group}/bulletin}">{title}</a>
{entry_date format='%l, %F %d, %Y'}
{exp:char_limit total="100"}
{summary}
{body}
{/exp:char_limit}
{if allow_comments}
<a href="http://{url_title_path=">Comments ({comment_total})</a> •
{/if}
{if allow_trackbacks}
({trackback_total})<a href="http://{trackback_path=">Trackbacks</a> •
{/if}
<a href="http://{title_permalink={my_template_group}/index}">Permalink</a>
</div>
{/exp:weblog:entries}There are three articles in the weblog. They were showing up on my home page a couple of hours ago, but now they are not. I checked the sql queries ee is issuing, and I think I’ve discovered the problem, but I don’t know how to fix it. Here are the sql queries…note the AND t.entry_id = ‘19’ toward the bottom:
mysql> SELECT t.entry_id FROM exp_weblog_titles AS t LEFT JOIN exp_weblogs ON t.weblog_id = exp_weblogs.weblog_id LEFT JOIN exp_members AS m ON m.member_id = t.author_id WHERE t.entry_id !=’’ AND t.site_id IN (‘1’) AND t.entry_date < 1275484729 AND (t.expiration_date = 0 OR t.expiration_date > 1275484729) AND t.entry_id = ‘19’ AND exp_weblogs.is_user_blog = ‘n’ AND t.weblog_id = ‘5’ AND t.status = ‘open’ ORDER BY t.sticky desc, t.entry_date desc, t.entry_id desc LIMIT 0, 3;
Empty set (0.00 sec)
If I remove AND t.entry_id = ‘19’ and run the query, I get the entry_id’s for the three entries:
mysql> SELECT t.entry_id FROM exp_weblog_titles AS t LEFT JOIN exp_weblogs ON t.weblog_id = exp_weblogs.weblog_id LEFT JOIN exp_members AS m ON m.member_id = t.author_id WHERE t.entry_id !=’’ AND t.site_id IN (‘1’) AND t.entry_date < 1275484729 AND (t.expiration_date = 0 OR t.expiration_date > 1275484729) AND exp_weblogs.is_user_blog = ‘n’ AND t.weblog_id = ‘5’ AND t.status = ‘open’ ORDER BY t.sticky desc, t.entry_date desc, t.entry_id desc LIMIT 0, 3;
+—————+
| entry_id |
+—————+
| 20 |
| 14 |
| 13 |
+—————+
I tried clearing all caches and disabling sql caching, but neither seemed to work. Any help is much appreciated.
Thanks,
Troy