Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unwatched topics still show in the unread topics pages #6907

Closed
live627 opened this issue Aug 3, 2021 · 4 comments · Fixed by #6908
Closed

Unwatched topics still show in the unread topics pages #6907

live627 opened this issue Aug 3, 2021 · 4 comments · Fixed by #6908
Assignees
Labels
Milestone

Comments

@live627
Copy link
Contributor

live627 commented Aug 3, 2021

Description

--Description Here--

Steps to reproduce

  1. Have a multi-page tropic
  2. Mark only the first page read
  3. Set the topic's alert prefs to ignore
  4. Observe the topic is still in the unread lists

Additional information/references

I have a fix coming shortly which modifies the queries to have the requisite predicate in the WHERE clause rather than the ON clause of LEFT JOIN.

@live627 live627 added the Topics label Aug 3, 2021
@live627 live627 added this to the 2.1.0 milestone Aug 3, 2021
@live627 live627 self-assigned this Aug 3, 2021
live627 added a commit to live627/SMF2.1 that referenced this issue Aug 3, 2021
Move the unwatched predicates from LEFT JOINed tables to the WHERE clause to ensure that the value is picked up as intended. Use COALESCE for when the row/value does not exist.

Fix SimpleMachines#6907

Signed-off-by: John Rayes <live627@gmail.com>
live627 added a commit to live627/SMF2.1 that referenced this issue Aug 3, 2021
Move the unwatched predicates from LEFT JOINed tables to the WHERE clause to ensure that the value is picked up as intended. Use COALESCE for when the row/value does not exist.

Fix SimpleMachines#6907

Signed-off-by: John Rayes <live627@gmail.com>
@Sesquipedalian
Copy link
Member

Sesquipedalian commented Aug 3, 2021

I can't reproduce this.

What I did:

  1. Went to a multi-page topic that my user was watching.
  2. Clicked the "Mark Unread" button, which of course took me back to the topic index and marked the topic as unread.
  3. Verified that the topic appeared in both "Unread Posts" and "Updated Topics" (it did).
  4. Viewed the first page of the topic again.
  5. Selected "Not Following" in the notification button menu.
  6. Checked both the "Unread Posts" and "Updated Topics" lists.

Result: the topic did not display in either list.

@live627
Copy link
Contributor Author

live627 commented Aug 4, 2021

That's perplexing. I was able to reproduce on localhost, @smfbigguy's site, and a unit test.

Can you confirm that the topic in log_tropics has a msg id that is between the first and last messages?

@Sesquipedalian
Copy link
Member

I'll try it again soon and let you know.

@Sesquipedalian
Copy link
Member

Confirmed. The topic is unwatched and id_msg is set to the id of one of the replies to the topic.

log_topics table (filtered to hide irrelevant rows):
Screen Shot 2021-08-08 at 11 27 15 AM

messages table (filtered to hide irrelevant rows):
Screen Shot 2021-08-08 at 11 26 45 AM

Result: topic 135 is marked as new on the message index, but does not show up in ?action=unread or in ?action=unreadreplies:
Screen Shot 2021-08-08 at 11 28 08 AM
Screen Shot 2021-08-08 at 11 34 45 AM
Screen Shot 2021-08-08 at 11 34 54 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants