Closed keeeeenw closed 11 years ago
When the link is clicked on a person's interest page, javascript function changeDisplayedColleges is called. Then, the program goes to the else case and calls "macademia.initiateCollegeString($.address.parameter('institutions'));" The initiateCollegeString() function is looking for an id, but the id is not undefined.
The problem is $.address.parameter('institutions') is undefined. In other words, the institutions parameter is not in the url. My fix is to manually test the case under macadamia.changeGraph() function and set "institutions" as "all" if it is not defined.
When you click on the link, there will be an alert saying "error occured during state change: TypeError: 'undefined' is not an object (evaluating 'ids.replace')".
If your refresh the same page after clicking the link, the page will work as expected.
The problem may be related to changeCollegeString() and changeDisplayedColleges() under lib.macademia.collegefilter.js.
The console gives this error code:
root for 18195 is Meredith Marko Harrigan (Communication) clusters are [[11091, 12076]] with names [familycommunication, interpersonalcommunication] 2013-06-26 17:03:47,586 [http-bio-8080-exec-26] INFO macademia.SimilarityService - It took 54 to build Meredith Marko Harrigan (Communication) graph | Error 2013-06-26 17:03:50,382 [http-bio-8080-exec-26] ERROR errors.GrailsExceptionResolver - NumberFormatException occurred when processing request: [GET] /Macademia/all/interest/json/18193 - parameters: density: 3 institutions: undefined For input string: "undefined". Stacktrace follows: Message: For input string: "undefined" Line | Method ->> 48 | forInputString in java.lang.NumberFormatException
| 410 | parseLong in java.lang.Long | 525 | valueOf . . . . . . . . . . . in '' | 71 | getInstitutionFilterFromParams in org.macademia.InstitutionGroupService | 40 | doCall . . . . . . . . . . . . in org.macademia.InterestController$_closure4 | 66 | doFilter in grails.plugin.springcache.web.GrailsFragmentCachingFilter | 86 | doFilter . . . . . . . . . . . in net.sf.ehcache.constructs.web.filter.Filter | 895 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker | 918 | run . . . . . . . . . . . . . in '' ^ 680 | run in java.lang.Thread