d0c37ab6f0269c790d237ea37f9d4873136aec97 max Tue Jan 21 02:16:18 2025 -0800 defaulting to filename when there is no browser line, refs #35085 diff --git src/hg/lib/customTrack.c src/hg/lib/customTrack.c index 126ec6f..6e287e0 100644 --- src/hg/lib/customTrack.c +++ src/hg/lib/customTrack.c @@ -835,31 +835,31 @@ "Optional track documentation appears to be either too large (greater than 50k) or it starts with a track or browser line. " "This is usually an indication that the data has been accidentally put into the documentation field. " "Only html documentation is intended for this field. " "Please correct and re-submit."); html = NULL; /* we do not want to save this bad value */ customText = NULL; /* trigger a return to the edit page */ } struct customTrack *newCts = NULL, *ct = NULL; if (isNotEmpty(customText)) { /* protect against format errors in input from user */ struct errCatch *errCatch = errCatchNew(); if (errCatchStart(errCatch)) { - newCts = customFactoryParse(genomeDb, customText, FALSE, &browserLines); + newCts = customFactoryParse(genomeDb, customText, FALSE, fileName, &browserLines); if (html) { for (ct = newCts; ct != NULL; ct = ct->next) if (!ctHtmlUrl(ct)) ct->tdb->html = cloneString(html); freez(&html); } customTrackHandleLift(genomeDb, newCts); } errCatchEnd(errCatch); if (errCatch->gotError) { char *msg = cloneString(errCatch->message->string); if (fileName && fileName[0]) @@ -894,31 +894,31 @@ struct customTrack *nextCt = NULL; boolean removedCt = FALSE; /* load existing custom tracks from trash file */ boolean changedCt = FALSE; if (customTracksExist(cart, &ctFileName)) { /* protect against corrupted CT trash file or table, or transient system error */ boolean loadFailed = FALSE; struct errCatch *errCatch = errCatchNew(); if (errCatchStart(errCatch)) { if (cartOptionalString(cart, "ctTest") != NULL) errAbort("ctTest set"); ctList = - customFactoryParse(genomeDb, ctFileName, TRUE, retBrowserLines); + customFactoryParse(genomeDb, ctFileName, TRUE, fileName, retBrowserLines); } errCatchEnd(errCatch); if (errCatch->gotError) { if ( errCatch->message->string != NULL) { unsigned len = strlen(errCatch->message->string); if (len > 0) // remove the newline errCatch->message->string[len - 1] = 0; } warn("Custom track loading error (%s): failed to load custom tracks. " "This is a temporary internal error, please refresh your browser. If you continue to experience this issue" "please reach out to genome-www@soe.ucsc.edu and send us a session link " "where this error occurs", errCatch->message->string);