When searching bookmarks in library, the first and last items get swapped

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
Dariush

When searching bookmarks in library, the first and last items get swapped

Unread post by Dariush » 2017-09-10, 11:28

When performing a search over bookmarks (or a specific bookmark folder) in library, resulting items get sorted by date, but first and last items swap places. Here's what it looks like on a fresh profile:
Image
Image
This is present in Firefox as well.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35620
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: When searching bookmarks in library, the first and last items get swapped

Unread post by Moonchild » 2017-09-10, 14:27

You're not sorting by date. To sort by date you have to click the column header. looks like you don't use any sorting criteria in which case it is going to be ordered by whatever sort order the query results come back in. Having a sort criterion set does sort properly (I verified) so it's not a bug.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Dariush

Re: When searching bookmarks in library, the first and last items get swapped

Unread post by Dariush » 2017-09-10, 15:10

I know that manual sorting works correctly. The issue is that the default sorting makes no sense - it's almost by date, but not fully so to be completely useful; plus, the symptoms (the swap of two specific items) make me think that there's some unnecessary transformation being applied to the result set, so I thought that it may be worth a look. Alternatively, it may be a good idea to artificially swap the first and last items back into their places, so the default sort fully corresponds to sorting by date.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35620
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: When searching bookmarks in library, the first and last items get swapped

Unread post by Moonchild » 2017-09-10, 17:33

Look carefully. It didn't swap the first and last items.
What order it'll be in would depend on what order it happens to end up being stored in the database. That is unsorted and on an "as-available" basis. So, it "may" end up looking like what you have or it may end up completely random, all depending on the last db maintenance run, insertions, deletions, item sizes, etc.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Dariush

Re: When searching bookmarks in library, the first and last items get swapped

Unread post by Dariush » 2017-09-10, 19:16

Ah, all right. In that case, may I request an option to specify a certain sorting as default, please?

Locked