Opened 4 years ago
Closed 4 years ago
#2770 closed defect (wontfix)
Possible Taxonomy Attach Data Issue
| Reported by: | Benjamin Haag | Owned by: | Benjamin Haag |
|---|---|---|---|
| Priority: | medium | Milestone: | |
| Component: | Other | Version: | N/A |
| Severity: | Keywords: | ||
| Cc: | Database Engine: | N/A | |
| Operating System: | N/A |
Description
Identified during 3/11 server 2.3.3 release: certain taxonomy image URLs seem to be malformed:
https://npgsweb.ars-grin.gov/gringlobal/taxon/taxonomydetail?id=104280
Above page (example) has broken link under "Images" heading. File referenced in URL is present on server.
<img src="../uploads/images/npgs/images/nc7/helianthus/tax/slide11.jpg" alt="Natural habitat" height="200">
F:\images\npgs\nc7\helianthus\tax
Change History (3)
comment:2 by , 4 years ago
This is likely due to image paths on the old Unix server being different in the form /pub/npgs/images/site/... while the widows server is .../uploads/images/npgs/site. I believe this was corrected in the accession_inv_image table, but taxonomy_attach got overlooked.
This query finds the 137 problem records an shows how to correct them:
SELECT taxonomy_attach_id, virtual_path,
REPLACE(virtual_path, '/npgs/images/', '/npgs/') as fix_path
FROM taxonomy_attach
WHERE virtual_path like '/npgs/images%'

A number of taxonomy_attach records use relative paths; may be correlated.