Page 1 of 1

[solved] News Module - sort by category not working?

Posted: Tue Jun 17, 2014 11:49 am
by lone
Hello - after an upgrade from 1.11.9 to 1.11.10, News module apparently will no longer sort by category.

I have tested this on a clean install on 1.11.10.
Summary of news:

Code: Select all

 {news number='5' detailpage='news'}
Default sorting, most recent newsitem first, as expected.

Code: Select all

 {news number='5' detailpage='news' sortby='news_category'}
For this, I would expect an alphabetic sorting according to category names.
But this shows oldest newsitem first, and disregards the categories.

Temporary testsite here: http://testsite1.dk/cms2/
Categories are shown: A D C B.
Oldest Newsitem first.

Is this a bug, or am I missing something here?

regards, Lone

Re: News Module - sort by category not working?

Posted: Tue Jun 17, 2014 12:16 pm
by velden

Re: News Module - sort by category not working?

Posted: Wed Jun 25, 2014 9:51 pm
by lone
Hi Velden

I tried your suggestion and altered the code on line 148 as described in the bugfix. This worked for some of the sorting:

This works as expected:

Code: Select all

{news number='5' sortby='start_time''}  
{news number='5' sortby='end_time'}
{news number='5' sortby='news_data'} 
{news number='5' sortby='news_title'} 
{news number='5' sortby='news_extra'}
This does not work as expected, shows sorted by time, oldest first, do not reacts to sortasc option

Code: Select all

{news number='5' sortby='news_category'} 
This does not work as expected, shows sorted by time, newest first, reacts to sortasc option

Code: Select all

{news number='5' sortby='news_summary'}
So the sortby news category was not fixed by this - if you have more suggestions they are very welcome.

regards, Lone

Re: News Module - sort by category not working?

Posted: Wed Sep 17, 2014 7:13 pm
by lone
An update on this: The sort by news_category did have a bug, and the bug is listed as solved in CMSMS version 1.11.11. In addition: sortby='news_summary' should be sortby='summary' in the example above.