Post Reply 
Sorting posts in this section of forum is broken (?) [HP PRIME SOFTWARE LIBRARY]
01-21-2017, 01:18 PM (This post was last modified: 01-21-2017 03:30 PM by Katie Wasserman.)
Post: #1
Sorting posts in this section of forum is broken (?) [HP PRIME SOFTWARE LIBRARY]
[MOVED FROM THE HP PRIME SOFTWARE LIBRARY - katie]

I'm unable to sort posts in this section of forum (as it works elsewhere).

I want to sort posts as:

Sort by: Last Post
Order: Descending
From: The Beginning

If I choose these in dropboxes at bottom of the page and click Go then it works. Then I click on Next button (or any page number) then Order reverts to Ascending.

Anybody else is seeing the same behaviour?
[Firefox 50.1.0]

       

Geocaching Coords Solver, Number of triangles Puzzle
Find all posts by this user
Quote this message in a reply
01-21-2017, 03:28 PM
Post: #2
RE: Sorting posts in this section of forum is broken (?)
I agree it's broken. Furthermore it's broken in at least one other sub-forum in the HP Software Libraries area but it works correctly on the main forum, for example.

Dave, this is pretty weird. Is there some sort of setting that needs to be applied to all forums that's only applied to some of them?

-katie

Visit this user's website Find all posts by this user
Quote this message in a reply
01-21-2017, 05:41 PM
Post: #3
RE: Sorting posts in this section of forum is broken (?) [HP PRIME SOFTWARE LIBRARY]
Honestly, I'm not sure what setting I would be looking for. My guess would be bug of some sort. If there was a list of forums that behave correctly and incorrectly I could look for any settings differences that the groups might have in common.
Visit this user's website Find all posts by this user
Quote this message in a reply
02-13-2017, 03:43 PM (This post was last modified: 02-13-2017 03:43 PM by Han.)
Post: #4
RE: Sorting posts in this section of forum is broken (?) [HP PRIME SOFTWARE LIBRARY]
(01-21-2017 05:41 PM)Dave Hicks Wrote:  Honestly, I'm not sure what setting I would be looking for. My guess would be bug of some sort. If there was a list of forums that behave correctly and incorrectly I could look for any settings differences that the groups might have in common.

Whatever generates the links for the pages does not include the sort order in the link. After sorting in descending order, for example, hover your mouse over link for page 2 at the bottom. I see:

Code:
http://www.hpmuseum.org/forum/forum-15-page-2.html?sortby=views&datecut=9999

The sortby=views should be sortby=views&order=desc.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
02-13-2017, 05:29 PM (This post was last modified: 02-13-2017 05:30 PM by Han.)
Post: #5
RE: Sorting posts in this section of forum is broken (?) [HP PRIME SOFTWARE LIBRARY]
In the file forumdisplay.php at line 697 is the following code:

Code:
    if($sortordernow != "desc")
    {
        $page_url .= "{$q}{$and}order={$sortordernow}";
        $q = '';
        $and = "&";
    }

The problem is that the default sort is ascending (for software libraries) as set by the administrator for this particular forum. However, the code is programmed to assume that the default mode is always descending, so that URLs with a descending sort (as selected by readers) do not have order=desc added to them. But when the URL is processed and since the default behavior for non-explicit sort order is to use ascended sort (set by the administrator), the user never gets the descended sort.

Therein lies the problem -- the admin-selected default is 'asc' whereas the assumed default is 'desc'.

I am sure that by simply removing the test and making the sort order always explicit we will solve this issue. I would change the above to:

Code:
        $page_url .= "{$q}{$and}order={$sortordernow}";
        $q = '';
        $and = "&";

(remove the surrounding brackets and if statement)

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
02-25-2017, 03:26 PM
Post: #6
RE: Sorting posts in this section of forum is broken (?) [HP PRIME SOFTWARE LIBRARY]
So is there any chance we can try out this fix?

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
02-27-2017, 01:01 AM
Post: #7
RE: Sorting posts in this section of forum is broken (?) [HP PRIME SOFTWARE LIBRARY]
It could be tried at some point but I'm currently pretty busy. At least I'm back home now, but coming home seems to lead to more things to get done by yesterday.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)