37dde06377a1daa9d86150ed431b89c49c699e10 braney Tue Mar 3 14:45:09 2020 -0800 fix a problem introduced by f87fbb58. Track hub tracks are in a group called after the hub name (eg hub_#). Refs #25050 diff --git src/hg/lib/cartTrackDb.c src/hg/lib/cartTrackDb.c index ed6e5d2..702d4d8 100644 --- src/hg/lib/cartTrackDb.c +++ src/hg/lib/cartTrackDb.c @@ -78,31 +78,32 @@ struct hash *groupsInTrackList = newHash(0); struct hash *groupsInDatabase = newHash(0); struct trackDb *track; /* Do some error checking for tracks with group names that are not in database. * Warnings at this stage mess up CGIs that may produce text output like hgTables & hgIntegrator, * so don't warn, just put CTs in group user and others in group x. */ groupsAll = hLoadGrps(db); if (!trackHubDatabase(db)) { struct hash *allGroups = hashNew(0); for (group = groupsAll; group != NULL; group = group->next) hashAdd(allGroups, group->name, group); for (track = trackList; track != NULL; track = track->next) { - if (!hashLookup(allGroups, track->grp)) + /* If track isn't in a track up, and has a group we don't know about, change it to one we do. */ + if (!startsWith("hub_", track->grp) && !hashLookup(allGroups, track->grp)) { fprintf(stderr, "Track %s has group %s, which isn't in grp table\n", track->table, track->grp); if (isCustomTrack(track->track)) track->grp = cloneString("user"); else track->grp = cloneString("x"); } } hashFree(&allGroups); } /* Stream through track list building up hash of active groups. */ for (track = trackList; track != NULL; track = track->next) {