SMF bug: replying to topic with mismatch of replies

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
SMF bug: replying to topic with mismatch of replies
« on January 26th, 2013, 06:47 PM »
We all know that if you try to reply to a topic that has been replied to in the intervening time, you should get a message. But it won't do that if there is a mismatch the other way.

Specifically, when you try to reply to a topic, the number of replies in the topic is known to the reply page. And if the number of replies is greater, it will throw you the message.

But if there are less replies than it said, it won't give you a message. Specifically in my case, I replied to a thread, only to discover that the last half a dozen replies had been split off into another topic, leaving my reply to be an orphan.[1]

Need to investigate about checking for a mismatch either way rather than just > count.
 1. And no, no amount of 'return me to my post' would have made it clear that that was what had happened either.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,079

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278

Kindred

  • Posts: 166
Re: SMF bug: replying to topic with mismatch of replies
« Reply #3, on January 27th, 2013, 01:56 AM »
hmmm...   Well, I'll admit, I am the one who split it off... I then grabbed your extra post and did a split/merge to sync it up with the appropriate split topic.
So, I see where you are coming from and a message wouldn't hurt...
I am not sure how common the occurrence would be though

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: SMF bug: replying to topic with mismatch of replies
« Reply #4, on January 27th, 2013, 02:13 AM »
Yeah, that was what prompted it :P

But yeah, I don't think it would be *that* common but remember, the bulk of the logic is already there anyway. Instead of checking the number of replies, check the last message id. If that's different, something's changed between starting to reply and hitting the button. It shouldn't even add any extra work that isn't being done already.

Auk

  • Can I get a Box?
  • Posts: 64
Re: SMF bug: replying to topic with mismatch of replies
« Reply #5, on January 27th, 2013, 06:27 AM »
Shouldn't the count of posts be updated upon when posts gets spited from a thread, or after the last person makes a post?

In the event a post/split is successful:
1. Update count (With simple minus/addition)
2. Add post/split
Posted: January 27th, 2013, 06:25 AM

Wait. Or maybe there should just be 2 counters actually.

One for the usual number of times posted.
Another for the actual count of posts currently existing in thread.

Nothing is more despicable than respect based on fear.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: SMF bug: replying to topic with mismatch of replies
« Reply #6, on January 27th, 2013, 07:26 AM »
Yes, bt that's not the point.

In this form, right here where quick reply is, it includes the number of replies "right now" . When the reply is sent off, it's compared with the number of replies on the server and if there are more replies on the server than there were when I started writing, boom, there's the message.

But if the reply count is suddenly lower, nothing happens. I'm just saying that we already fetch that information, we already process most of it, we just don't do anything currently if we split posts off or delete them. It is entirely possible to write an angry reply to a post only for that post to be removed unexpectedly.

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: SMF bug: replying to topic with mismatch of replies
« Reply #7, on January 27th, 2013, 10:26 AM »
I thought SMF did the change to last post before we forked it. I kinda remember making a bug report about it at the time... maybe I was even the one who started the idea of using last post Id. Don't remember too well. Years ago.
Maybe they reverted it? dunno. It doesn't make sense to me.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278

Kindred

  • Posts: 166
Re: SMF bug: replying to topic with mismatch of replies
« Reply #9, on January 27th, 2013, 03:46 PM »
No, Arantor is right...   

From what I can tell, the system CHECKS the reply count when you press submit, but it only triggers a message if the reply count is HIGHER (new messages have been posted since you started writing). Although I suspect it would not be a common occurrence, I think he is probably correct in that SMF (and Wedge) should present a similar message if replies have been removed (some replies appear to have been split, deleted or otherwise removed since you started writing)


Hey Arantor, if you are looking into the logic used...  what happens if a post is MERGED while you are in the middle of replying?
replying to post A - post A is merged into post B (combined topic becoming post B)
-- I have no idea how the system would deal with this...  your original topic has disappeared and there is no target

replying to post A - post B is mereged into post A (combined topic becoming post A)
-- I assume this would trigger the normal new posts have bee made" dialogue?
 

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: SMF bug: replying to topic with mismatch of replies
« Reply #10, on January 27th, 2013, 04:05 PM »
Quote
No, Arantor is right...
I'm not entirely right on this one, though, as we'll see in a moment.
Quote
From what I can tell, the system CHECKS the reply count when you press submit, but it only triggers a message if the reply count is HIGHER (new messages have been posted since you started writing)
No, it actually checks the last id. There was a time when it did check the number of replies, however.
Quote
]Hey Arantor, if you are looking into the logic used...  what happens if a post is MERGED while you are in the middle of replying?
Well it's a little more complicated, I'm presuming you're actually talking about merging topics, not merging posts (which is also possible), but let's examine all of it.

Merging posts (post A, post B, then becomes post A which contains post B's contents as well) - if post B is created and merged in the time it takes the new post to be written, the last msg id is unaffected; it is effectively no different to post A being edited in mechanical terms. If the post B was present when starting to write the message, but is no longer present uniquely under its own id (because it's now been merged), this would be the sort of case where the last id would drop but no notification would occur to the user.

Merging topics... if we merge in a topic into the current topic, there are now more replies than before. However, it all comes down to whether there were any messages in the merged-in topic that are after the existing topic's last post, if not, there's no notification because as far as it knows, the last message id hasn't changed. If the last id has changed, then yes, it should trigger it.

If we try to reply to a topic that no longer exists, it tells us so with our old friend "The topic or board you are looking for appears to be either missing or off limits to you."

Kindred

  • Posts: 166

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: SMF bug: replying to topic with mismatch of replies
« Reply #12, on January 27th, 2013, 04:51 PM »
Perhaps we need to track both items through the quick reply/full reply (ugh) and check both on posting.
Posted: January 27th, 2013, 04:50 PM

Just for fun, reply count will also be affected if you delete posts, approve posts and so on. That's likely why it uses last msg id.