Jump to:

1835 Posts in 1139 Topics by 554 members

Blog Module

SilverStripe Forums » Blog Module » 2.4 archive problem

Discuss the Blog Module.

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

Page: 1 2
Go to End
Author Topic: 1905 Views
  • shakingpaper
    Avatar
    Community Member
    15 Posts

    2.4 archive problem Link to this post

    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

  • Bruce B
    Avatar
    Community Member
    145 Posts

    Re: 2.4 archive problem Link to this post

    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.

  • shakingpaper
    Avatar
    Community Member
    15 Posts

    Re: 2.4 archive problem Link to this post

    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

  • shakingpaper
    Avatar
    Community Member
    15 Posts

    Re: 2.4 archive problem Link to this post

    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?

  • Bruce B
    Avatar
    Community Member
    145 Posts

    Re: 2.4 archive problem Link to this post

    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

  • shakingpaper
    Avatar
    Community Member
    15 Posts

    Re: 2.4 archive problem Link to this post

    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.

  • Bruce B
    Avatar
    Community Member
    145 Posts

    Re: 2.4 archive problem Link to this post

    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?

  • Bruce B
    Avatar
    Community Member
    145 Posts

    Re: 2.4 archive problem Link to this post

    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.

    1905 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.