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

Deleting a game version with authorExt breaks gameprofilelinks #1206

Open
dfabulich opened this issue Dec 12, 2024 · 3 comments
Open

Deleting a game version with authorExt breaks gameprofilelinks #1206

dfabulich opened this issue Dec 12, 2024 · 3 comments
Labels
accurate data IFDB data should be complete and correct moderation tools This affects the way moderators do their work

Comments

@dfabulich
Copy link
Collaborator

dfabulich commented Dec 12, 2024

MariaDB [ifdb]> select gpl.* from gameprofilelinks gpl
join games on games.id = gameid where authorExt is null;
+------------------+------------------+---------------------+
| gameid           | userid           | moddate             |
+------------------+------------------+---------------------+
| 2t1ulhzlz82ycbj7 | sizbae6ix4ge9pa2 | 2010-08-30 13:56:30 |
| 08cvrv46idil7fth | rtwk8n84r3mail9i | 2018-09-03 09:24:10 |
| mt9zy6fqpkwishtq | y5hnu94znl7tnryk | 2024-09-01 17:59:26 |
+------------------+------------------+---------------------+

In each case, the game lists no profile links, but the user profile links to that game.

@dfabulich dfabulich added the accurate data IFDB data should be complete and correct label Dec 12, 2024
@dfabulich
Copy link
Collaborator Author

dfabulich commented Dec 12, 2024

One way to reproduce this is to delete a game version, like this.

  1. In a Docker test environment, login as ifdbadmin, and create a new game listing, title "test" author "test"
  2. Edit the game listing, change the author to Jeremy Freese {9k1wi1rc7qphxchl}. Now when you click the profile link next to Freese's name, it will take you to his profile page, which will link to your test listing.
  3. Return to the test listing, click View Update History in the footer, and click "Delete Version", rolling back to the initial version where the author is "test".

Expected: The "test" game should now be removed from Jeremy Freese's profile
Actual: The "test" game remains on Jeremy Freese's profile

@dfabulich
Copy link
Collaborator Author

dfabulich commented Dec 12, 2024

In the case of Welcome to the Universe, I think this one may be kinda my fault!

When I was running my IFComp importer, I believe I made a mistake with copying and pasting some TUIDs around, and accidentally transmogrified Welcome to the Universe into the wrong game entirely. (I can't remember what game it was now. There's not even a way to prove that this ever happened, because I was only able to delete my bogus change. #1207)

I went in and deleted my bogus version, but that must have triggered this bug.

@dfabulich dfabulich changed the title Some gameprofilelinks are out of sync with games.authorExt Rolling back a game version's author breaks gameprofilelinks Dec 12, 2024
@dfabulich dfabulich added the moderation tools This affects the way moderators do their work label Dec 12, 2024
@dfabulich
Copy link
Collaborator Author

dfabulich commented Dec 12, 2024

I ran this in production; the bogus backlinks are gone for now, but this bug remains.

delete from gameprofilelinks where gameid in 
select gameid from gameprofilelinks
join games on games.id = gameid where authorExt is null);

(I also went in and manually linked Uno zombie a Deadville to Tommaso Caldarola.)

@dfabulich dfabulich changed the title Rolling back a game version's author breaks gameprofilelinks Deleting a game version with authorExt breaks gameprofilelinks Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accurate data IFDB data should be complete and correct moderation tools This affects the way moderators do their work
Projects
None yet
Development

No branches or pull requests

1 participant