Jump to:

1851 Posts in 1606 Topics by 561 members

Blog Module

SilverStripe Forums » Blog Module » Tag and date filtering not working in blog

Discuss the Blog Module.

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

Page: 1
Go to End
Author Topic: 1736 Views
  • losqualo
    Avatar
    Community Member
    17 Posts

    Tag and date filtering not working in blog Link to this post

    Hi,

    I have a blog tree with a few blog holders below it and each blog holder has a set of associated tags.

    The root of the blog tree is accessed with the url:

    domain.com/articles/

    and the holders are then below that root.

    If I select one of the holders then I get a page listing the blog entries under that holder, and the sidebar includes a list of tags and archive dates relevant to that holder. Each article also has its tags listed below its title.

    Up to this point, and then clicking a title to get to an individual entry is working completely as expected.

    However, if I click one of the tags, or an archive month, then all I get is the listing of _all_ entries under a specific blog holder, regardless of whether it satisfies the tag or date filtering request.

    The tag filtering url is of the form:

    domain.com/articles/holder_name/tag/tagname

    and the date filtering url is of the form:

    domain.com/articles/holder_name/date/yyyy/mm

    Both of these look to me to be as expected, so the fact that they do not work suggests some other problem... but what? I have no idea.

    The result in both cases is that I just get the full unfiltered list of entries under the specified holder.

    Do I need to add code to the BlogHolder.php file? I was expecting this to work out of the box... Other than running the blog under a differently named root ('articles'), and placing copies of the templates into mytheme_blog/templates folder, the code is very much as provided in the 0.4.0 download (running under SS 2.4).

    Any ideas? Things I need to check.

    Cheers

    Rob
    /edited for spelling/

  • losqualo
    Avatar
    Community Member
    17 Posts

    Re: Tag and date filtering not working in blog Link to this post

    Hi,

    I found mention of a patch to 0.4.0 at

    http://open.silverstripe.org/ticket/5667

    I've applied that and now the tag filtering works as expected, but date filtering is continuously generating 404s.

    This patch supposedly fixes blog select/filter by year, but I cannot get that to work at all... whether by date/yyyy or date/yyyy/mm, no date-based filtering appears to work.

    It is good though to have tag-based filtering now OK.

    Cheers

    Rob

  • losqualo
    Avatar
    Community Member
    17 Posts

    Re: Tag and date filtering not working in blog Link to this post

    I'm at a loss... Date filtering wasn't working at all yesterday, now it is.

    Yesterday I installed the patch and done a dev/build. This got tag filtering working, but not date filtering.

    Today I installed some further modules (userforms, mollum and spamprotection) and repeated the dev/build... Now date fitering is working, but I'm at a loss to explain why!

    Unless I missed something in yesterday's build.

    Whatever, while surprising and I don't understand why, it is still most welcome to have date filtering working as well now.

    Rob

  • leola
    Avatar
    Community Member
    5 Posts

    Re: Tag and date filtering not working in blog Link to this post

    hi,

    im working with silverstripe 2.4.5 and and the latest trunk of blog module and have the same problem with blogtree. i get error 404 if i select a date from the archive-widget. after reading the entries from losqualo i udated all other modules (userforms, spamprotection, recapcha .. ) but had not the same results. it still is not working.

    the url seems ok to me: /blogtreename/date/2011/03 , because it is similar to the blogholder: blogholdername/date/2011/03

    i hope somebody has an idea what i can check/do/replace.

    andreas

  • jaredkipe
    Avatar
    Community Member
    16 Posts

    Re: Tag and date filtering not working in blog Link to this post

    See http://silverstripe.org/blog-module-forum/show/17515
    Basically add 'date' to BlogTree_Controller's $allowed_actions

    1736 Views
Page: 1
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.