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.

Blog Module

Discuss the Blog Module.

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

Tag and date filtering not working in blog


Reply

5 Posts   1750 Views

Avatar
losqualo

3 September 2010 at 6:42pm (Last edited: 3 September 2010 6:43pm), Community Member, 17 Posts

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/

Avatar
losqualo

3 September 2010 at 7:54pm (Last edited: 3 September 2010 7:55pm), Community Member, 17 Posts

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

Avatar
losqualo

4 September 2010 at 9:48pm Community Member, 17 Posts

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

Avatar
leola

29 March 2011 at 11:07am Community Member, 5 Posts

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

Avatar
jaredkipe

16 July 2011 at 11:53am Community Member, 16 Posts

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