iftechfoundation / ifdb-suggestion-tracker

Bugs and feature requests for a future IFDB update
10 stars 0 forks source link

`ifarchive-commit` doesn't create a history entry #397

Open dfabulich opened 9 months ago

dfabulich commented 9 months ago

https://github.com/iftechfoundation/ifdb/blob/main/www/ifarchive-commit

ifarchive-commit updates external links to correspond with whatever the IF Archive says it should be. But it does so without creating a history entry, so there's no good way to see when/how it worked.

Background

IFDB has two features related to the IF Archive:

Pending files: When you Edit a game on IFDB, and edit an External Link, there’s a box you can check, “This file is pending.”

Underneath the box, it says:

Check this box if this is a “pending” upload, meaning that this URL is not yet working but will be soon. For example, you can use this if you just uploaded the file to the IF Archive and it hasn’t been moved to its final location yet.

It includes a “More Info” link to https://ifdb.org/help-pending-link which says:

The “pending” checkbox for an external link tells IFDB that the file isn’t available for download yet, but will be soon. If you check this box, IFDB will do two things:

  • Hide the link on the game’s home page, so that users viewing the page won’t be confused by a broken link error.
  • Check the URL periodically to see if it’s working yet, and remove the “pending” flag as soon as the link works.

This option is especially useful with the IF Archive, because files uploaded to the Archive are not available for download until they’re reviewed by administrators. This process usually takes a few days. You could just wait to add the download link until the file appears on the Archive, but the “pending” option saves you that extra editing step. Just check the box, and IFDB will monitor the Archive for you, updating the link as soon as it’s working.

When you check the “pending” box, the link is completely hidden on the IFDB game details page. (It’s not even visible in a “pending link” state.)

I believe/suspect that IFDB is supposed to have some kind of cron job for managing this, but there’s no such cron job set up on ifdb.org right now as of Oct 2023.

IF Archive Uploading: We have an upload form at https://ifdb.org/ifarchive-upload that looks superficially like the form at https://upload.ifarchive.org/cgi-bin/upload.py … but the IFDB form does something else special.

We don’t normally link to https://ifdb.org/ifarchive-upload directly; we link to it from the “Edit Game” page for each IFDB listing. It will automagically populate the upload form, which is kinda nice, but, more importantly, it will set the External Link to a link like this: https://ifdb.org/ifarchive-pending?ifdbid=$id where $id is a randomized ID number (not the game’s TUID, but it looks like one, as a 16-digit string of letters and numbers.)

No human is ever supposed to see that link or go to https://ifdb.org/ifarchive-pending … if you do, you’ll see a help page that tries to explain the situation.

When IF Archive makes a request to http://ifdb.org/ifarchive-commit?ifdbid=X&path=Y, we’ll update the External Link with $id=X to point to the the path that ifarchive.org tells us it should really be, and we’ll remove the pending status from the link.