Jump to:

1851 Posts in 1606 Topics by 561 members

Blog Module

SilverStripe Forums » Blog Module » Archive widget doesn't work

Discuss the Blog Module.

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

Page: 1 2 3
Go to End
Author Topic: 4723 Views
  • Joshuarr
    Avatar
    Community Member
    37 Posts

    Re: Archive widget doesn't work Link to this post

    Lestatron, your fix worked great for me, thanks.

  • lestatron
    Avatar
    Community Member
    7 Posts

    Re: Archive widget doesn't work Link to this post

    Ultimate you should probably try to debug the 2) BlogHolder.php function BlogEntries() (Line 199) using echo for $year and $month. See if the url params are correct. And be sure you haven't deleted the sub if and if else which creates date string for the entries query!

  • Web Designer Perth
    Avatar
    Community Member
    49 Posts

    Re: Archive widget doesn't work Link to this post

    bruceb's fix worked for me

  • lestatron
    Avatar
    Community Member
    7 Posts

    Re: Archive widget doesn't work Link to this post

    bruceb fix will work until the year number hits 2010. Basically you have to add a new allowed action for every year you want to be able to query with archive widget. So it isn't very nice and solid solution...

  • Bruce B
    Avatar
    Community Member
    145 Posts

    Re: Archive widget doesn't work Link to this post

    My fix was not intended to be permanent, just until a new version of the blog module was released. At this stage, I'd probably add '2010' just to be safe. Its a quick fix for those with less confidence in editing multiple files but it does mean you will have to go back to those clients' sites when the new module is released.

    Lestatron's fix, however, means that you don't have to go back and update published projects when the new blog version is released.

    That raises an issue for another thread - how do people handle subsequent version updates once a project is completed and handed over to the client? Maintenance and upgrades for 12 months built into the original quote?

    I should mention that I've added 'SearchForm' to the list of allowed actions in blogholder.php as well - otherwise search doesn't work within the blog.

  • lestatron
    Avatar
    Community Member
    7 Posts

    Re: Archive widget doesn't work Link to this post

    Yep! bruceb I totally agree with you. I should have written this text in my post, but I'm too lazy.
    I added the 'SearchForm' action fix to my solution as well.
    Thanks for the hint!

  • BLU42 Media
    Avatar
    Community Member
    71 Posts

    Re: Archive widget doesn't work Link to this post

    @lestatron - Great fix - simple yet effective!!

  • steve_nyhof
    Avatar
    Community Member
    224 Posts

    Re: Archive widget doesn't work Link to this post

    For me the page just refreshes - nothing changes

    I downloaded the latest blog module and that one does not save the widgets on the widget tab.

    Any other ideas?

    4723 Views
Page: 1 2 3
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.