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

Forum Last Post by a Deleted User Error #3425

Open
AutismFather opened this issue Aug 2, 2023 · 3 comments
Open

Forum Last Post by a Deleted User Error #3425

AutismFather opened this issue Aug 2, 2023 · 3 comments
Labels

Comments

@AutismFather
Copy link

Describe the issue

I deleted a user from the panel and now one of my forums is broken because the last post made in one of the threads was by that user. Now the forum returns an error because it's trying to grab their avatar and display name but the user no longer exists.

NamelessMC Version

2.1.0

To Reproduce

  1. Create a forum and a thread.
  2. Have a user create a post and be the last post in that thread.
  3. Delete user.
  4. Visit that forum.

Expected Behaviour

It should just no longer have any posts available by that deleted user, so there's no need to try to retrieve their data.

Screenshots

namelessmc_error

Additional Information

No response

@samerton
Copy link
Member

samerton commented Aug 2, 2023

The issue here is that the DeleteUserForumHook did not trigger when the user was deleted to remove their forum content - this is strange because I'm not able to reproduce the issue locally on the latest development code.

I'm not sure this is worth handling within the forum module because the hook should be triggering correctly. I can't say I know why the hook didn't trigger but I will have a think as to what might have happened.

@samerton
Copy link
Member

samerton commented Aug 2, 2023

Could maybe have a queue task which runs nightly to clear out any bad data such as this, but it'd mean there's potentially several hours when this type of error could occur

@partydragen
Copy link
Member

Skjermbilde 2023-08-02 224529
Skjermbilde 2023-08-02 224600

Just to have it logged for this cause ^^ With happens if user is deleted

  • Websites made after pr13 deletes all rows from user automaticly, due of the table rules thing
  • Older websites requires hook to be successfull to delete the rows with is not triggered if module is disabled or if another module listener break before forum listener is run

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

No branches or pull requests

3 participants