I’ve been searching for several hours in the forums for this issue, and while I see similar, I’m not quite seeing the exact problem I’m having, unless it’s just sailing over my head this week.
I set up a mini calendar exactly like the help docs said, and it does show a link when there is a post for a specific date.
But when I click on that URL, which looks like this:
http://www.mysite.com/eengine/index.php/blog/2015/01/06
It generates a 404 not found.
The monthly archives work fine, and the only difference with the URL is the last two digits:
http://www.mysite.com/eengine/index.php/blog/2015/01
Is there some other extra template I need to create to get it to show the posts for that specific day? Some setting in the admin panel that I missed?
Thanks.
It’s ironic that you’re the one to reply, I used your eBook to set up the bulk of the site. 😊
Yes, there is logic for 404 pages, and yes I’m using day_path. I copied the code for the mini calendar from the Docs page exactly, and changed out the channel variables for my site’s set up.
(edited to add…) there is no .htaccess in my eengine directory.
From my “embeds/footer_widgets” template, where the calendar is. I also added the status part in my troubleshooting, thinking it wasn’t automatically detecting the default statuses (no customs used).
<div id="footer-widgets" class="footer-widgets">
<div class="wrap">
<div class="footer-widgets-1 widget-area">
<div id="calendar-2" class="widget widget_calendar">
<div class="widget-wrap">
<h4 class="widgettitle">What's the date?</h4>
<div id="calendar_wrap">
{exp:channel:calendar switch="calendarToday|calendarCell" channel="blog|portfolio" status="open|closed"}
<table id="wp-calendar" border="0" cellpadding="6" cellspacing="1" summary="My Calendar">
<tr class="calendarHeader">
<th><div class="calendarMonthLinks"><a href="http://{previous_path=blog/index}"><<</a></div></th>
<th colspan="5">{date format="%F %Y"}</th>
<th><div class="calendarMonthLinks"><a href="http://{next_path=blog/index}class=calendarMonthLinks">>></a></div></th>
</tr>
<tr>
{calendar_heading}
<td class="calendarDayHeading">{lang:weekday_abrev}</td>
{/calendar_heading}
</tr>
{calendar_rows }
{row_start}<tr>{/row_start}
{if entries}
<td class='{switch}' align='center'><a href="http://{day_path=blog/index}">{day_number}</a></td>
{/if}
{if not_entries}
<td class='{switch}' align='center'>{day_number}</td>
{/if}
{if blank}
<td class='calendarBlank'>{day_number}</td>
{/if}
{row_end}</tr>{/row_end}
{/calendar_rows}
</table>
{/exp:channel:calendar}
</div>
</div>
</div>
</div>And some pieces from my “blog/index” template, showing the 404 code at the top, with the center parts clipped out, and showing the embed at the bottom for the footer:
{if segment_4 != ""}
{redirect="site/404"}
{/if}
{embed="embeds/html_header" my_page_title="Home"}
{embed="embeds/page_header" the_url_title="blog" my_location="home"}
<SNIP>
{embed="embeds/footer_widgets"}
{snp_footer}I also just realized that moving forward or backward through the months in the calendar reloads the entire page, and makes it suddenly become that month’s archive page, rather than just moving the calendar ahead/back and leaving it on the main index page, or whatever page it happens to be displaying at the time. Since I haven’t really messed with this very much since setting it up, I don’t know if this is expected behavior or if there is something else that needs to be added or changed to get it to simply cycle through the mini calendar rather than refreshing the whole page. Probably something for another time, one problem at a time… 😊
Awesome. That was it! Time to go change the other templates where that is set.
The other thing I saw, I now realize is expected behavior after comparing it to a non-EE CMS that also does a calendar. I’m sure there is probably some way to get the calendar to be the only thing that changes on the page using javascript or php, but that is more than I care to really worry about at the moment. I’m just glad the daily page is now showing up.
Thanks!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.