df10c2a997dd6578f49113d97109816d9eaaee03
chmalee
  Wed Apr 24 10:04:24 2019 -0700
Adding checks for hub and genome description pages and fixing incorrect error message when composite/superTracks have no children, refs #18870

diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c
index 842be4d..7c52faa 100644
--- src/hg/hgHubConnect/hgHubConnect.c
+++ src/hg/hgHubConnect/hgHubConnect.c
@@ -377,48 +377,50 @@
     puts("</tr>");
     }
 
 printf("</tbody></TABLE>\n");
 printf("</div>");
 }
 
 int doCheckTrackDb(struct dyString *errors, struct trackHub *hub,
                     struct trackHubGenome *genome)
 /* Attempt to open a trackDb from a hub and report errors back.
  * Eventually will check every stanza and not die if there's an error with the first one*/
 {
 int errorCount = 0;
 struct trackDb *tdb = NULL, *tdbList = NULL;
 struct errCatch *errCatch = errCatchNew();
-struct errCatch *trackFileCatch = errCatchNew();
 if (errCatchStart(errCatch))
     {
     tdbList = trackHubTracksForGenome(hub, genome);
+    tdbList = trackDbLinkUpGenerations(tdbList);
+    tdbList = trackDbPolishAfterLinkup(tdbList, genome->name);
+    trackHubPolishTrackNames(genome->trackHub, tdbList);
     for (tdb = tdbList; tdb != NULL; tdb = tdb->next)
         {
-        dyStringPrintf(errors, "<ul>\n<li>track name: %s\n", tdb->track);
+        struct errCatch *trackFileCatch = errCatchNew();
         if (errCatchStart(trackFileCatch))
             hubCheckBigDataUrl(hub, genome, tdb);
         errCatchEnd(trackFileCatch);
         if (trackFileCatch->gotError)
             {
             errorCount += 1;
+            dyStringPrintf(errors, "<ul>\n<li>track name: %s\n", tdb->track);
             dyStringPrintf(errors, "<ul>\n<li><span class=\"hubError\"><b>bigDataUrl error</b>: %s</span></li></ul></ul>\n", trackFileCatch->message->string);
-            dyStringClear(trackFileCatch->message);
-            }
             }
         errCatchFree(&trackFileCatch);
+        }
     if (tdb != NULL)
         {
         dyStringPrintf(errors, "<ul>\n<li>No errors found</li>\n</ul></ul>");
         }
     }
 errCatchEnd(errCatch);
 if (errCatch->gotError)
     {
     errorCount += 1;
     dyStringPrintf(errors, "<ul><li><span class=\"hubError\">Error: %s</span></li></ul>\n",
         errCatch->message->string);
     }
 errCatchFree(&errCatch);
 return errorCount;
 }