c0b183c96763a6ebf2c050e82859373309a2befe angie Fri Oct 31 17:19:56 2014 -0700 When lookupPosition() returns false (multiple search results), thesubsequent call to doMainPage(conn, TRUE) was causing a popWarnHandler underflow errAbort because doMainPage ends with an htmlClose (which btw invokes popWarnHandler three times: one directly, once in cartWebEnd and once in webEnd). The symptom was that changes made to the main page form before looking up a term that returned multiple results were lost because the underflow errAbort prevented the cart from being saved. The solution is to not use doMainPage(conn, TRUE) but instead to call mainPageAfterOpen enclosed by push and pop of web warn/error handlers. Since doMainPage(conn, TRUE) caused trouble that can be avoided by calling mainPageAfterOpen, I removed the option. I also removed dead code doLookupPosition; dispatch is called only when lookupPosition() has already returned a single match, so the work is already done and it will default to the main page anyway. refs #12557 diff --git src/hg/hgTables/hgTables.h src/hg/hgTables/hgTables.h index 767df67..03de2f1 100644 --- src/hg/hgTables/hgTables.h +++ src/hg/hgTables/hgTables.h @@ -931,31 +931,31 @@ char *filter, /* Filter to add to SQL where clause if any. */ struct hash *idHash, /* Restrict to id's in this hash if non-NULL. */ struct lm *lm, /* Where to allocate memory. */ int *retFieldCount); /* Number of fields. */ /* Return a bed list of all items in the given range in subtrack-merged table. * Cleanup result via lmCleanup(&lm) rather than bedFreeList. */ struct bed *dbGetFilteredBedsOnRegions(struct sqlConnection *conn, char *db, char *dbVarName, char *table, char *tableVarName, struct region *regionList, struct lm *lm, int *retFieldCount); /* Get list of beds from database in region that pass filtering. */ /* ----------- Page displayers -------------- */ -void doMainPage(struct sqlConnection *conn, boolean webStarted); +void doMainPage(struct sqlConnection *conn); /* Put up the first page user sees. */ void mainPageAfterOpen(struct sqlConnection *conn); /* Put up main page assuming htmlOpen()/htmlClose() * will happen in calling routine. */ void doTest(); /* Put up a page to see what happens. */ void doTableSchema(char *db, char *table, struct sqlConnection *conn); /* Show schema around table. */ void doSchema(struct sqlConnection *conn); /* Show schema around current track. */