03478e629ac21b1dc68b92ae7d993d1a7314cac2 jcasper Mon Sep 22 11:15:22 2025 -0700 hgTables needed help finding trackDb for hic custom tracks, refs #36389 diff --git src/hg/hgTables/mainPage.c src/hg/hgTables/mainPage.c index a98856a432a..046b70160c8 100644 --- src/hg/hgTables/mainPage.c +++ src/hg/hgTables/mainPage.c @@ -757,31 +757,40 @@ } if (curTrack == NULL) { struct trackDb *tdb = hTrackDbForTrack(database, curTable); struct trackDb *cTdb = hCompositeTrackDbForSubtrack(database, tdb); if (cTdb) curTrack = cTdb; else curTrack = tdb; isMaf = isMafTable(database, curTrack, curTable); } /* Table-specific options */ if (isHicTable(curTable)) - hicMainPageConfig(cart, hTrackDbForTrack(database,curTable)); + { + // Seems like there should be a better way to do this, but I'm not clear what it is at the moment. + // TrackDb processing could probably use some refactoring. + struct trackDb *tdb = hTrackDbForTrack(database,curTable); + if (tdb == NULL) + tdb = findTdbForTable(database, curTrack, curTable, ctLookupName); + if (tdb == NULL) + errAbort("Unable to find trackDb structure for track; something is wrong"); + hicMainPageConfig(cart, tdb); + } hPrintf("