Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Blog Module /

Discuss the Blog Module.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

2.4 archive problem


Go to End


11 Posts   4120 Views

Avatar
shakingpaper

Community Member, 15 Posts

25 May 2010 at 6:20pm

I have a couple of blogs (using 0.3.0) and after upgrade, my archive links in the sidebar are no longer working. My code is as follows:

	<% if DisplayMode == month %>
	<ul class="archiveMonths">
		<% control Dates %>
			<li>
				<a href="$Link">
					$Date.Format(F) $Date.Year
				</a>
			</li>
		<% end_control %>
	</ul>
<% else %>
	<ul class="archiveYears">
		<% control Dates %>
			<li>
				<a href="$Link">
					$Date.Year<% if Last %><% else %>,<% end_if %>
				</a>
			</li>
		<% end_control %>
	</ul>
<% end_if %>

Any advice would be great,

Thanks

Avatar
Bruce B

Community Member, 164 Posts

2 June 2010 at 5:13pm

Can you be more specific as to what isn't working? version 0.4 of the blog is now released so install that first. There is still a problem with that version and the archive widget but I need to know that you are running the latest version and the exact nature of your problem.

Avatar
shakingpaper

Community Member, 15 Posts

7 June 2010 at 1:01pm

I just upgraded to .4 and the issue is still occurring.

Basically, I had the sidebar set up to show archive links by month. It was working in 2.3.7 but now the links no longer show in the siderbar (despite the fact that there is content)

Let me know if there is any more code I can show you to help explain further,

Thanks

Avatar
shakingpaper

Community Member, 15 Posts

13 June 2010 at 12:43pm

The issue of the archive links has been resolved by changing the tables described here: http://www.silverstripe.org/blog-module-forum/show/285321?start=0#post285362

However, I am getting 404's on the archive links - the current structure is /news/date/2010/04

Any able to help resolve this?

Avatar
Bruce B

Community Member, 164 Posts

14 June 2010 at 10:05am

I had trouble with the archive module accepting year dates. The fix meant patching a couple of files. See this ticket for my changes:
http://open.silverstripe.org/ticket/5667

Cheers
Bruce

Avatar
shakingpaper

Community Member, 15 Posts

14 June 2010 at 11:07am

Thanks Bruce,

I applied those files but am still getting 404's. Are there any files I can show you that may help in diagnosing the issue?

Really appreciate your help.

Avatar
Bruce B

Community Member, 164 Posts

14 June 2010 at 6:48pm

I'm a bit limited this week - I'm away from the office with just an iPad so I can't see any code. Does it work if you switch to year archives rather than months?

Avatar
Bruce B

Community Member, 164 Posts

14 June 2010 at 7:02pm

Not being able to see code is frustrating. I'm wondering if the blog module is expecting to be called 'blog' rather than news? Not good coding, I know, but can you investigate? I think the relevant code is inside blogtree.php and/or archive.php.

Go to Top