4a5d2dbd54249e247fb49728e5fc9c598cb37efb angie Fri Jan 11 11:29:12 2019 -0800 If it appears that the user tried to upload custom track data as a session, then give them a link to hgCustom. refs #22638 diff --git src/hg/hgSession/hgSession.c src/hg/hgSession/hgSession.c index 91170e8..9fb0097 100644 --- src/hg/hgSession/hgSession.c +++ src/hg/hgSession/hgSession.c @@ -1323,31 +1323,41 @@ { dyStringAppend(dyMessage, dyLoadMessage->string); cartCopyCustomComposites(cart); hubConnectLoadHubs(cart); cartCopyCustomTracks(cart); cartHideDefaultTracks(cart); cartCheckForCustomTracks(cart, dyMessage); } else { dyStringClear(dyMessage); dyStringAppend(dyMessage, "" "Unable to load session: "); dyStringAppend(dyMessage, dyLoadMessage->string); dyStringAppend(dyMessage, "The uploaded file needs to have been previously saved from the " - "Save Settings section. If you feel you have reached this " + "Save Settings section.\n"); + // Looking for the words "custom track" in an error string is hokey, returning an enum + // from cartLoadSettings would be better, but IMO that isn't worth a big refactoring. + if (stringIn("custom track", dyLoadMessage->string)) + { + dyStringPrintf(dyMessage, "If you would like to upload a custom track, please use the " + "" + "Custom Tracks tool.\n", + hgCustomName(), cartSidUrlString(cart)); + } + dyStringAppend(dyMessage, "If you feel you have reached this " "message in error, please contact the " "string)); dyStringAppend(dyMessage, "%0ACan you help me upload the data?\">" "UCSC Genome Browser team for assistance.\n"); } dyStringFree(&dyLoadMessage); } return dyStringCannibalize(&dyMessage); } void renamePrefixedCartVar(char *prefix, char *oldName, char *newName) /* If cart has prefix+oldName, replace it with prefix+newName = submit. */