This project is read-only.

Sort in replies to a thread

Nov 25, 2012 at 10:49 PM


Is there any way at present to sort the replies to a thread by original published date or created date?

At present, latest reply shows on the top and original post shows on the bottom. Also if any replies or the post itself is updated, it shows in the new sort order as if it is sorting on modified date with latest on top.

Standard Forum's behavior including this one (on code-plex) is that reply sort remains fixed on created date or first published date.

Please advice.

Nov 25, 2012 at 11:16 PM

Hi tippingpoint,

That's very odd behaviour.

I have just pushed an update to order by publish date, this means that if someone modifies their post (not that they can at the moment) it will stay in order. I think the next piece of functionality will be adding in a type of Ordering.

Could you please pull and let me know if you are getting the behaviour you expect?


Nov 25, 2012 at 11:21 PM

Also, can you make sure that you have the setting 'Threaded Posts' on your forum turned off. This is something I have pushed in, and is not yet 100% working.


Nov 26, 2012 at 12:06 AM

Did a pull just now...still same odd behavior.. Did you change Get method in PostService.cs?

On trying to go to settings, admin page failed seeking for column "ThreadedPosts". Seems like I need to reinstall the module to kick of Migrations from scratch and have Create() executed or locally add the column in update method.

Nov 26, 2012 at 12:39 AM

Did some research. I think saving the posts (replies) from admin dashboard is changing PublishedUtc and ModifiedUtc both. I don't know whether this is by design in Orchard for content items but it's causing sort to get messed up.

I think you should sort Ascending on post id or Created date, which doesn't change with editing, unless PublishedUtc update can be avoided while updating the posts. 

Nov 26, 2012 at 9:15 AM

Ah yes, you are right it should be CreatedDate, I will make that change later on today.

From your point of view, what else do you think should be in this core module?

Nov 27, 2012 at 12:06 AM


As per my suggestions, this (codeplex) forum is a great example of a highly functional forum. Few new features as per my suggestions are Edit (based on user) / Reply and Reply with quote. Also, it would be helpful to have few out of the box templates to render the forum home page with categories as on Discussion page of this (codeplex) forum.