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/hgTracks/config.c src/hg/hgTracks/config.c index 1a59b8fa9bb..28257e86458 100644 --- src/hg/hgTracks/config.c +++ src/hg/hgTracks/config.c @@ -355,33 +355,33 @@ * confusing to the javascript submit() function. */ char submitName[256]; safef(submitName, sizeof(submitName), "%sSubmit", group->name); cgiMakeButtonWithMsg(submitName, "Submit","Submit your selections and view them in the browser"); hPrintf("\n"); hPrintf("\n"); /* First non-CT, non-hub group gets ruler. */ if (!showedRuler && !isHubTrack(group->name) && differentString(group->name, "user")) { showedRuler = TRUE; hPrintf("",(isOpen ? "" : "style='display: none'"), group->name); hPrintf(""); - hPrintf("", hgTrackUiName(), + hPrintf("", hgTrackUiName(), cartSessionVarName(), cartSessionId(cart), - chromName, RULER_TRACK_NAME); + database, chromName, RULER_TRACK_NAME); hPrintf("%s", RULER_TRACK_LABEL); hPrintf(""); hTvDropDownClassVisOnlyWithLabel("ruler", rulerMode, FALSE, rulerMode ? "normalText trackVis" : "hiddenText trackVis", NULL, RULER_TRACK_LABEL); hPrintf(""); hPrintf("Chromosome position in bases. (Clicks here zoom in 3x)"); hPrintf("\n"); } /* Scan track list to determine which supertracks have visible member * tracks, and to insert a track in the list for the supertrack. * Sort tracks and supertracks together by priority */ makeGlobalTrackHash(trackList); groupTrackListAddSuper(cart, group, superHash, trackHash); @@ -429,35 +429,35 @@ for (tr = group->trackList; tr != NULL; tr = tr->next) { struct track *track = tr->track; struct trackDb *tdb = track->tdb; hPrintf("",(isOpen ? "" : "style='display: none;'"), group->name, rowCount++); hPrintf(""); if (tdbIsSuperTrackChild(tdb)) /* indent members of a supertrack */ hPrintf("    "); hPrintIcons(tdb); if (track->hasUi) - hPrintf("", + hPrintf("", tdb->parent ? "Part of super track: " : "Configure ", tdb->parent ? tdb->parent->shortLabel : tdb->shortLabel, hTrackUiForTrack(tdb->track), - cartSessionVarName(), cartSessionId(cart), track->track); + cartSessionVarName(), cartSessionId(cart), database, track->track); hPrintf(" %s", tdb->shortLabel); if (track->hasUi) hPrintf(""); hPrintf(""); if (tdbIsSuperTrackChild(tdb)) /* indent members of a supertrack */ hPrintf("    "); /* If track is not on this chrom print an informational message for the user. */ if (tdbIsDownloadsOnly(tdb)) // No vis display for downloadsOnly hPrintf("Downloads", hgFileUiName(),cartSessionVarName(), cartSessionId(cart), tdb->track); else if (hTrackOnChrom(track->tdb, chromName)) {