Sort Orders not sorting?

Is Coranto not working properly for you? Here's where to ask for support help; for best results, follow these steps:
  • - Check your core/addon documentation for possible solutions
  • - Search these forums for similar problems that have already been solved
  • - If you're still stumped, check out THIS TOPIC, and post your question in this forum!!

Moderators: Spunkmeyer, Dale Ray, SrNupsen, Bluetooth, Jackanape

Sort Orders not sorting?

Postby Jgold723 » Tue May 16, 2006 4:39 pm

I have sort orders 2.3, Coranto 1.24.

Sort orders is enabled.

The profile is set to sort on a specific field

The field is a single-line text field in which I am placing numbers (1,2,3,4 etc.)

And it won't sort! I've tried full rebuild, I've tried changing the type of sort (alphabetical, numerical, etc.) Nothing changes the sorting, which appears to be by default, Reverse Chronological.

Where else should I be looking?

John
Jgold723
 
Posts: 63
Joined: Wed Jan 10, 2007 6:44 pm

Postby Dale Ray » Fri May 19, 2006 7:08 pm

jgold723,

I deleted the second post that you made identical to this one in another topic. Please have some patience when waiting for a response to your questions.

You need to provide a bit more info to get an informed response.

What type of profile are you using? (Standard, Maginot, etc)

Do you have any filtering options set? Filtering and sorting can sometimes cause unexpected output.

What order are your items coming out?

What other addons are you using?

Doing a forum search for the words 'sort' and 'filter' (requiring both words) returns 96 matches and for 'sortorders' returns 55 matches. Have you checked for a possible solution there?

I personally use sotorders to sort by numbers entered into a single-line text field and it works fine.
Dale Ray
User avatar
Dale Ray
 
Posts: 1001
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby Jgold723 » Fri May 19, 2006 11:51 pm

Hi Dale:

Sorry -- I wasn't trying to spam the forum or anything -- I just thought the other forum might be a more appropriate spot.

Anyway, I'm using a standard profile, no filtering. The items are coming out in the default order ... i.e. reverse chronology, with the newest on top.

I'm stumped because I've set up sort orders successfully on other installations and as far as I can tell, I'm doing the same thing here. But obviously not.

Thanks for any suggestions you may have.

John
Jgold723
 
Posts: 63
Joined: Wed Jan 10, 2007 6:44 pm

Postby Dale Ray » Sat May 20, 2006 4:18 am

Ok - I did some a simple test with sample news items on a local install.

Coranto 1.24
SortOrders v 2.3
Category Addon enabled

No other addons enabled.

I used the following data 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90

After testing with this data I added leading zeros to the single digit numbers.

Results:

Sorted by a specific field

1,10,2,20,3,30,4,40,5,50,6,60,7,70,8,80,9,90,

This is what you would expect most sort routines to do because we are sorting numbers alphabetically.

Sorted Numerically by a specific field

1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90

This is also the expected result

Using leading zeros and sorted numerically

01,02,03,04,05,06,07,08,09,10,20,30,40,50,60,70,80,90

Also worked as expected, the leading zeros do not change the numeric value

Sort by a specific field with leading zeros

01,02,03,04,05,06,07,08,09,10,20,30,40,50,60,70,80,90

If you want to sort by two fields and one is a number and one is not you NEED the leading zeros. (SortOrders doesn't offer the option of sorting one filed numerically and one alphabetically)

Default - reverse Chronological

90,80,70,60,50,40,30,20,10,09,08,07,06,05,04,03,02,01

Done after I had added the leading zeros, but this is the reverse of the order I entered the items in.

Chronological order

01,02,03,04,05,06,07,08,09,10,20,30,40,50,60,70,80,90

Working as expected.

I also added a value (34) after the others and tested with various sort settings and the results were as expected. I can not replicate your problem.

Thoughts and Suggestions

Please take a closer look at your settings to make sure they are correct.

Is it possible that the profile is disabled so you change the settings and build news, but you are looking at an old text file each time so that it appears there has been no change?

Have you changed the name of the output file, but are still looking at the old file with the old name?

Do new items show up when submitted?

If you delete an item is it gone from the text file after a build?

Try creating a new style and profile for testing that uses the same items. Are the results the same?

I am stumped since I can't recreate the problem and am throwing out random thoughts.
Dale Ray
User avatar
Dale Ray
 
Posts: 1001
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby Jgold723 » Sat May 20, 2006 10:17 am

Hi Dale --

Many thanks for your thoughts and extensive research. I took a closer look at the profiles and actual files generated.

I have a news profile which is set to generate a news.txt file using the default style and a headlines.txt file using a different style.

When I opened the two files, I found that the news.txt file is being sorted, but the headlines.txt file is not.

I don't see anywhere to indicate that the headlines file should be sorted -- since it is part of the overall profile. Do I need to create a separate profile for the purpose?

John
Jgold723
 
Posts: 63
Joined: Wed Jan 10, 2007 6:44 pm

Postby Dale Ray » Sat May 20, 2006 1:44 pm

If you want to sort the headlines using the SortOrders addon you need to use a separate profile to create them.

I usually make a profile with the same name and a _hl suffix. By using a second profile you have much more flexibility.
Dale Ray
User avatar
Dale Ray
 
Posts: 1001
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby Jgold723 » Thu May 25, 2006 12:50 pm

Ah -- thank you Dale for your help. That did it.

BUT -- it would seem to make sense that Sort Orders should also sort the headlines that are part of a profile, right? Would it be useful to suggest that this addon be modified to accomplish that?

Also -- as long as I'm making suggestions -- would it be possible to modify Sort Orders so that it will also sort profiles that are filtered by number? Currently these profiles ignore Sort Orders and sort everything by default (Reverse Chronology).

Thanks again,

John
Jgold723
 
Posts: 63
Joined: Wed Jan 10, 2007 6:44 pm

Postby Dale Ray » Thu May 25, 2006 3:47 pm

jgold723 wrote:BUT -- it would seem to make sense that Sort Orders should also sort the headlines that are part of a profile, right? Would it be useful to suggest that this addon be modified to accomplish that?


When you enable headlines for a profile in Coranto, Coranto actually creates a second profile (in the background out of sight of the user). This works fine for profiles that you you want simple headlines for. In order to make the headlines flexible you would have to have all of the normal profiles settings available on the profile page for the headlines. This in effect becomes the same as a separate profile and the settings page becomes huge and, possibly, confusing

To me it makes more sense when you want significant differences between your headlines and main items to use a second profile for the flexibility. You can present your items with different sorting/filtering options than you headlines this way. Also, using a separate profile for headlines you can use a non-standard profile for headlines if you wish.

jgold723 wrote:Also -- as long as I'm making suggestions -- would it be possible to modify Sort Orders so that it will also sort profiles that are filtered by number? Currently these profiles ignore Sort Orders and sort everything by default (Reverse Chronology).


To address the filter/sort issues that you have try the Profile Numeric Filter addon. Description:
Lets you specify if the numeric filter specified at the profile settings page for a normal profile should be conducted before or after the profile sorting routine. This is done through a Yes/No option available at the profile settings page.


You can choose which action happens first (sorting or filtering) using this addon.

You can get it at: Parahead´s Coranto Corner
Dale Ray
User avatar
Dale Ray
 
Posts: 1001
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby Jgold723 » Fri May 26, 2006 12:19 am

Hi Dale --

Thanks again for the feedback -- it's people like you that really make this program work so well.

I'll grab that addon you suggested. That, along with the knowledge about the extra profile, will make this all work.

Thanks again,

John
Jgold723
 
Posts: 63
Joined: Wed Jan 10, 2007 6:44 pm

Postby Parahead » Fri Jun 09, 2006 6:23 pm

Just to give some random information about this topic.

In Coranto 1.31.x there has been added an option that lets you sort the headlines in a different order than the default (reverse chronological). The sort orders addon has not been updated to give you even more options as it allows for the normal profile though. I really do not see any reason for this either, since as Dale Ray points out: If you want more control of the headlines, create a separate profile.

The Sort Orders addon could really be upgraded to have a much more flexible sorting algorithm, which would make it possible to choose a alpha/numeric and descending/ascending order on a per field basis. The New File Advanced addon includes a framework that can be reused for this purpose. Maybe someone is up for creating a Sort Orders Advanced addon?
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden


Return to Troubleshooting

Who is online

Users browsing this forum: No registered users and 2 guests

cron