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

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
lone
Forum Members
Forum Members
Posts: 71
Joined: Mon Feb 27, 2006 1:36 pm

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

Post 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
Last edited by lone on Wed Sep 17, 2014 7:13 pm, edited 1 time in total.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: News Module - sort by category not working?

Post by velden »

lone
Forum Members
Forum Members
Posts: 71
Joined: Mon Feb 27, 2006 1:36 pm

Re: News Module - sort by category not working?

Post 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
lone
Forum Members
Forum Members
Posts: 71
Joined: Mon Feb 27, 2006 1:36 pm

Re: News Module - sort by category not working?

Post 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.
Locked

Return to “CMSMS Core”