94041c12e043016875ebd340568bda0ccaf122f6 lrnassar Wed Jul 8 13:53:22 2026 -0700 Add db= to cross-CGI hgTracks/hgTrackUi/hgc links to prevent wrong-assembly errors. refs #37840 Completes the incomplete work from #26892: links from the browser to a different CGI omitted db=, so the target CGI fell back to the cart's db (often wrong), producing "Can't find in track database " errors and broken shared links. Adds the current-assembly db to link builders across hgTracks (chromGraphTrack, expRatioTracks, config ruler and per-track configure links, variation), hgVai, hgFileUi, hgGtexTrackSettings, hgBlat, hgGene, hgNear, the barChart/GTEx faceted UI (facetedBar, barChartUi, gtexUi), and the hgTrackUi group-configure link. diff --git src/hg/hgFileUi/hgFileUi.c src/hg/hgFileUi/hgFileUi.c index 28578b0bd9c..ab69d0e2cf6 100644 --- src/hg/hgFileUi/hgFileUi.c +++ src/hg/hgFileUi/hgFileUi.c @@ -28,45 +28,45 @@ jsIncludeFile("utils.js",NULL); } // QUESTION: Is this needed? Are we doing a submit on hgTrackUi to get here?? Probably not. //if(tdbIsContainer(tdb) && !ajax) // cartTdbTreeReshapeIfNeeded(cart,tdb); if (trackDbSetting(tdb, "wgEncode")) { printf(""); } printf("%s\n", tdb->longLabel); // If Composite, link to the hgTrackUi. But if downloadsOnly then link to any superTrack. -#define LINK_TO_PARENT "%s((%s)\n" if (tdbIsComposite(tdb)) { char *encodedTrackName = cgiEncode(tdb->track); printf(LINK_TO_PARENT,"  ", hgTrackUiName(), cartSessionVarName(), - cartSessionId(cart), chrom, encodedTrackName,tdb->shortLabel,"Track settings"); + cartSessionId(cart), db, chrom, encodedTrackName,tdb->shortLabel,"Track settings"); freeMem(encodedTrackName); } else if (tdb->parent) //Print link for parent track { char *encodedTrackName = cgiEncode(tdb->parent->track); printf(LINK_TO_PARENT,"  ", hgTrackUiName(), cartSessionVarName(), - cartSessionId(cart), chrom, encodedTrackName, tdb->parent->shortLabel, + cartSessionId(cart), db, chrom, encodedTrackName, tdb->parent->shortLabel, tdb->parent->shortLabel); freeMem(encodedTrackName); } // NAVLINKS - Link to Description down below if (tdb->html != NULL && tdb->html[0] != 0) { printf("