Is there any way to set the default sort order to show the most recently modified nodes at the top?

Comments

aimutch’s picture

Same request.

hutch’s picture

aimutch’s picture

Thanks. That worked. What was the change that was made to allow the change in default sort order?

hutch’s picture

The version I posted is what I deploy on my customer's sites, I was unhappy with workspace as it is and my attempts to get it fixed by posting patches failed so I rolled my own.
pager_query, tablesort_sql etc are rather picky about the SQL fed into them so I played around until it worked.
The best way to see the changes is to diff my version against the rc1 version.

aimutch’s picture

I'll give that a look-see. I don't understand why the patch wouldn't be accepted. Having it default to the current modified date seems the most logical way to present that to users. Thanks for doing the work to fix that.

hutch’s picture

Eh, things get lost in the wash ;-)

My version attempts to address several things:

1) I was unhappy with the existing permissions structure so I added 'access workspace' and attempted to fix it so that admin could view other user's workspaces. That part is still not working.

2) Comments weren't right, so I added code to check if the comment module is enabled and gave it a default maximum comments per page and added code to provide a textfield for custom amounts as for nodes and files.

3) Sort order was not working. This was because the Replies column would still be there although empty if Comments are not enabled. This hosed the sort order so I rejigged things to get it working. There is probably a better way of doing this but it works.

4) Paging was not working so I fixed that too.

5) I added code from a patch that was submitted ages ago that replaces '_' with '-' in $node_type. Not tested but it seems reasonable, I recall discussions elsewhere on this issue.

So to summarise most of the problems I found got fixed but the 'view all workspaces' permission still needs fixing.

Hope this helps and thanks for the prompt response.

frank ralf’s picture

@hutch
Many thanks for your ongoing efforts to improve this module!

I hope to find some time soon to incorporate the most recent pending patches into the dev version.

And if anyone is inclined, co-maintainers are always welcome ;-)

Frank