Author

Topic: ㅤ (Read 192 times)

legendary
Activity: 2730
Merit: 7065
Farewell, Leo. You will be missed!
August 02, 2021, 12:40:21 PM
#14
I thought it might be something browser-specific, but the same thing happens on all the browsers I tried (Chrome, Firefox, Edge). I only tried the 'sorting threads by replies' thingy and those two topics from fabioganga really do appear on both page 1 and 4 across all browsers. This is something that is best directed to theymos. He surely knows the ins and outs of this forum better than anyone else.
copper member
Activity: 1624
Merit: 1899
Amazon Prime Member #7
August 01, 2021, 07:45:48 PM
#13
I am not 100% certain, but I suspect this has to do with how the database is queried when sorting. When you visit a page, the database query limits 20 results and when you are visiting a page other than the first one, an offset is used. I believe a likely solution would be to always have a sort by topic ID to be used after all other sort criteria is applied.
Technically not exactly a bug as it's doing what you want it to do (since you're asking it to sort by replies), but surely inconvenient (since you can't specify additional sort order even if you wanted). A workaround in the code should be simple, just add e.g. thread id as the last part of the "order by", so that the resulting order is always defined the same way.
Hmmm, Plagiarism?  Cheesy  Cool  Roll Eyes 🤔👩‍💻
legendary
Activity: 3654
Merit: 8909
https://bpip.org
August 01, 2021, 07:01:57 PM
#12
Not sure cos on mobile but ;sort=starter;desc seems to do the trick ...

That just makes it sort descending. The issue is still happening.
copper member
Activity: 766
Merit: 700
Defend Bitcoin and its PoW: bitcoincleanup.com
August 01, 2021, 06:56:12 PM
#11
Yes, that's what it looks like and I think the biggest issue here is that you can't work around it from the user interface. For example if you could specify multiple "sort" columns in the URL, like ';sort=replies,first_post', that would be a clunky but possible workaround. But I don't think you can do that, at least none of the "hacks" I tried seem to be working

Not sure cos on mobile but ;sort=starter;desc seems to do the trick ...
legendary
Activity: 3654
Merit: 8909
https://bpip.org
August 01, 2021, 06:28:56 PM
#10
Might not be duplicates... unless you see them on the same page.
I just assume the order is mixed when you change the page.

Let's assume your posts are from the middle on page 10 to end of page 15. Those threads might get shuffled while changing pages and some threads can be seen again on some other pages. Not certain but seems likely that this is the "bug" here.

Yes, that's what it looks like and I think the biggest issue here is that you can't work around it from the user interface. For example if you could specify multiple "sort" columns in the URL, like ';sort=replies,first_post', that would be a clunky but possible workaround. But I don't think you can do that, at least none of the "hacks" I tried seem to be working and SMF source code seems to imply that only the following options are allowed:

Code:
// Default sort methods.
$sort_methods = array(
'subject' => 'mf.subject',
'starter' => 'IFNULL(memf.realName, mf.posterName)',
'last_poster' => 'IFNULL(meml.realName, ml.posterName)',
'replies' => 't.numReplies',
'views' => 't.numViews',
'first_post' => 't.ID_TOPIC',
'last_post' => 't.ID_LAST_MSG'
);

copper member
Activity: 766
Merit: 700
Defend Bitcoin and its PoW: bitcoincleanup.com
August 01, 2021, 05:46:15 PM
#9
I couldn't reproduce the issue with replies, but it did happen with "started by" - the ETC pool thread id 1651959 appeared on page 6 and page 7, then after a few refreshes disappeared from both, then appeared only on page 6, etc (pun not intended).

Might not be duplicates... unless you see them on the same page.
I just assume the order is mixed when you change the page.

Let's assume your posts are from the middle on page 10 to end of page 15. Those threads might get shuffled while changing pages and some threads can be seen again on some other pages. Not certain but seems likely that this is the "bug" here.
legendary
Activity: 1484
Merit: 1355
August 01, 2021, 05:43:22 PM
#8
Not sure what the problem is because the sorting by "Replies" works for me, without some duplicates here and there.
If I sort by Replies I get the first 31 pages with 0 replies and then 1 reply starts from page 32

From this, the randomness within these 32 pages with 0 answers will not go anywhere. If I want to view all these 32 pages, then I will see the arrangement of the topics at random and throughout these 32 pages the topics will be repeated many times.

Interesting. I had never noticed that bug before.
As suchmoon suggested, it is possible that the system does not have a defined fallback sorting criterion. Typically a topic ID should be used since it is unique for every topic.
legendary
Activity: 3654
Merit: 8909
https://bpip.org
August 01, 2021, 05:31:38 PM
#7
Even if you select sorting and press F5, the location of the topics will always change. This is not sorting, this is pure randomness.

It's not really random, it's probably whatever the database (MySQL?) does when you don't specify a sort order. I'm guessing that when you sort by a column, it generates a SQL query that has only that column in the "order by" clause and no fallback sort that would be used in case there are multiple records with the same column value (e.g. multiple threads with 0 replies).

Something like this:

Code:
select thread_id, thread_title, ...
from threads
order by replies

Technically not exactly a bug as it's doing what you want it to do (since you're asking it to sort by replies), but surely inconvenient (since you can't specify additional sort order even if you wanted). A workaround in the code should be simple, just add e.g. thread id as the last part of the "order by", so that the resulting order is always defined the same way.

Like this:

Code:
select thread_id, thread_title, ...
from threads
order by replies, thread_id


Not sure what the problem is because the sorting by "Replies" works for me, without some duplicates here and there.
If I sort by Replies I get the first 31 pages with 0 replies and then 1 reply starts from page 32


And also the sort by "Started by" works as advertised. It orders by OP. It is true that the multiple threads opened by the same user are not sorted, but it is to be expected because there is no other keyword except ";sort=replies".

I couldn't reproduce the issue with replies, but it did happen with "started by" - the ETC pool thread id 1651959 appeared on page 6 and page 7, then after a few refreshes disappeared from both, then appeared only on page 6, etc (pun not intended).
copper member
Activity: 1624
Merit: 1899
Amazon Prime Member #7
August 01, 2021, 04:26:32 PM
#6
As I know, this is about the power of the bump. a system introduced to reduce spam by Newly created accounts to create fake discussion and useless spam. Threads, where better ranked activity + earned merit members write, will always be ahead of threads with a bunch of spam posts from newbies.
Here is probably most of the answers Bumping changes on some boards

The bumping changes should only affect the order of threads when default sorting is used. The OP is referring to threads sorted via custom criteria.
legendary
Activity: 3248
Merit: 3098
August 01, 2021, 02:34:06 PM
#5
As I know, this is about the power of the bump. a system introduced to reduce spam by Newly created accounts to create fake discussion and useless spam. Threads, where better ranked activity + earned merit members write, will always be ahead of threads with a bunch of spam posts from newbies.
Here is probably most of the answers Bumping changes on some boards
newbie
Activity: 29
Merit: 10
August 01, 2021, 10:25:56 AM
#4
I often look for new projects in the ANN section (although there are few good projects now), the order of ANN's posts is different from other sections. There is a special mechanism called bump. I guess the strange order mentioned by OP in the topic may have something to do with this
In addition, posts are usually sorted in chronological order. I hope to find new projects with potential, not the more well-known projects that have been released before (because their profits are not as high as new projects)
copper member
Activity: 766
Merit: 700
Defend Bitcoin and its PoW: bitcoincleanup.com
July 30, 2021, 08:28:46 AM
#3
Not sure what the problem is because the sorting by "Replies" works for me, without some duplicates here and there.
If I sort by Replies I get the first 31 pages with 0 replies and then 1 reply starts from page 32


And also the sort by "Started by" works as advertised. It orders by OP. It is true that the multiple threads opened by the same user are not sorted, but it is to be expected because there is no other keyword except ";sort=replies".
copper member
Activity: 1624
Merit: 1899
Amazon Prime Member #7
July 30, 2021, 08:17:28 AM
#2
I am not 100% certain, but I suspect this has to do with how the database is queried when sorting. When you visit a page, the database query limits 20 results and when you are visiting a page other than the first one, an offset is used. I believe a likely solution would be to always have a sort by topic ID to be used after all other sort criteria is applied.
hero member
Activity: 520
Merit: 11957
July 30, 2021, 07:40:09 AM
#1
Jump to: