nsandlin / linepig

ID resource for erigonine spiders, using KE Emu & IMu.
http://linepig.fieldmuseum.org/
4 stars 0 forks source link

Backlink to wrong-ID image #14

Closed nsandlin closed 7 years ago

nsandlin commented 8 years ago

For accountability and reference, when we replace a wrong image with a right one, we want to link back to the wrong one.

Background: LinEpig had an Multimedia image labeled Oreonetides vaginatus which turned out to be some different (currently not determined) species of Oreonetides. We replaced it with a correct image, and linked the old image to just the genus. And we created a Narrative with the correction.

Task: In cases like this, I want to include a link from the good image's detail.php page to the narrative (I can make a template for it, no sweat).

Attachment setup: According to Sharon, it's a direct attachment from the new Multimedia object to the Taxonomy and a reverse attachment from the Taxonomy to the Narrative.

Details: MULTIMEDIA: NEW CORRECT IMAGE Oreonetides vaginatus female epigynum - irn: 1245798 MulOtherNumber_tab: 537638 (irn of species)

MULTIMEDIA: OLD INCORRECT IMAGE Oreonetides female epigynum - irn: 616726 MulOtherNumber_tab: 529895 (irn of genus)

TAXONONOMY Oreonetides vaginatus - irn: 537638 "View Attachments" Narratives

NARRATIVE Title: LinEpig image correction - irn: 4076 Narrative: "Image previously identified as Oreonetides vaginatus." Purpose: Web Narrative Type: Correction

peteherbst commented 8 years ago

I have some code up, in a new branch. If you want to take a look at it, I'm going to create a pull request now. I hope we don't have any conflicts with your existing code.

peteherbst commented 8 years ago

One thing to note in my code, for querying the Narrative, I'm just grabbing the first-attached Image. If you would like me to add some more additional checking, like for Type == 'correction', please let me know after you've merged the code.

nsandlin commented 8 years ago

Exciting! I'll take a look later today. We are about to have a pie party for Pi Day at my day job... :-)

On Mon, Mar 14, 2016 at 12:43 PM, Pete Herbst notifications@github.com wrote:

One thing to note in my code, for querying the Narrative, I'm just grabbing the first-attached Image. If you would like me to add some more additional checking, like for Type == 'correction', please let me know after you've merged the code.

— Reply to this email directly or view it on GitHub https://github.com/nsandlin/linepig/issues/14#issuecomment-196429692.

peteherbst commented 8 years ago

I wish I could have pie!

On Mon, Mar 14, 2016 at 12:47 PM Nina Sandlin notifications@github.com wrote:

Exciting! I'll take a look later today. We are about to have a pie party for Pi Day at my day job... :-)

On Mon, Mar 14, 2016 at 12:43 PM, Pete Herbst notifications@github.com wrote:

One thing to note in my code, for querying the Narrative, I'm just grabbing the first-attached Image. If you would like me to add some more additional checking, like for Type == 'correction', please let me know after you've merged the code.

— Reply to this email directly or view it on GitHub https://github.com/nsandlin/linepig/issues/14#issuecomment-196429692.

— Reply to this email directly or view it on GitHub https://github.com/nsandlin/linepig/issues/14#issuecomment-196431579.

nsandlin commented 8 years ago

You deserve pie!

On Mon, Mar 14, 2016 at 12:55 PM, Pete Herbst notifications@github.com wrote:

I wish I could have pie!

On Mon, Mar 14, 2016 at 12:47 PM Nina Sandlin notifications@github.com wrote:

Exciting! I'll take a look later today. We are about to have a pie party for Pi Day at my day job... :-)

On Mon, Mar 14, 2016 at 12:43 PM, Pete Herbst notifications@github.com wrote:

One thing to note in my code, for querying the Narrative, I'm just grabbing the first-attached Image. If you would like me to add some more additional checking, like for Type == 'correction', please let me know after you've merged the code.

— Reply to this email directly or view it on GitHub <https://github.com/nsandlin/linepig/issues/14#issuecomment-196429692 .

— Reply to this email directly or view it on GitHub https://github.com/nsandlin/linepig/issues/14#issuecomment-196431579.

— Reply to this email directly or view it on GitHub https://github.com/nsandlin/linepig/issues/14#issuecomment-196440143.

peteherbst commented 7 years ago

Example page: /multimedia/1245798

At the bottom, add in the proper Taxonomic identification (add attached Taxonomy record info) for the image, below it.

peteherbst commented 7 years ago

I believe I have finally fixed this. Pulling changes to dev in a bit.

peteherbst commented 7 years ago

Re-opening this. I have some issues to re-check.

peteherbst commented 7 years ago

I have the code in place. We're going to need to fix this together the next time you come in. Something's weird. :)

nsandlin commented 7 years ago

Currently the old, wrong image (with ID only to genus) is showing up in primary and on home page, as well as in top of Detail page, and correct new image is nowhere. Also at the moment, all Detail pages show the same image as being previously incorrectly shown as itself.

peteherbst commented 7 years ago

Description of how this functionality should work:

In the Multimedia record, in the MulOtherNumber_tab field is the Taxonomy IRN, on the Taxonomy record (for the records that had the incorrect image posted), we have a reverse-attached Narrative (NarNarrative) that holds the reference to the old Multimedia image that was incorrectly used.

peteherbst commented 7 years ago

FINALLY have this fixed. Going to do a pull on dev shortly.

nsandlin commented 7 years ago

We had this fixed before the holidays - there was a "previously shown" image down below, but not it's gone. http://linepig.fieldmuseum.org/multimedia/1245798

Also, on the main page, this item is identified only as "Oreonetides" not "Oreonetides vaginatus" which I don't remember being the case before.

The "bad" image is also showing up on the main page (also identified only as "Oreonetides" which in its case is correct). I assume that's because it still had a "primary" keyword. I removed it Friday, but the change is not showing up on live; probably didn't happen due to the update.

We have another case coming up that will need to use the "bad backlink" functionality.

peteherbst commented 7 years ago

We can take a look at this together again and try to see what's going on. Sorry!

peteherbst commented 7 years ago

Be sure to update the production database!