Open shaneshifflett opened 13 years ago
This actually appears to be an issue with the Timeline js. it breaks the rest of the interface and thus the awesome WYSIWYG interface doesn't load.
Uncaught TypeError: Cannot read property 'length' of null
line 1000 in functions.js: if (answerdata[slicestamp]["clip"].length > 140) {
appears that testing 2 instance wasn't up to date, deployed the lastest version and was given the following issue: Uncaught TypeError: Cannot call method 'replace' of null on line 1006
Some answerdata objects are returning null data. I surrounded this block to fix HTML issues in a try catch in hopes to rectify the situation for the time being
Merged shane-timeline-issue126 into master and deployed to testing 2. This appears to break the timeline but fixes all admin js issues. Looking over the code, I'm guessing each pass draws the whole timeline based on functions.js line 1035:
slices[slicestamp] = timeline.rect(leftoffset, 0, 2, 1).attr({fill: answerdata[slicestamp]["bgcolor"]}).attr("stroke-width",0).attr("opacity",0).attr("slicestamp",slicestamp);
and because we are escaping on items with bad data we skip out on this call and ultimately nothing is drawn.
A little refactoring should happen here to deal with bad elements in the ANSWERDATA list so we can try catch exceptions where we need to modify that element and throw it out of the list in the exception case and then we loop through the resulting list and draw that (since it should have clean data).
looks like it's just broken on testing2. I'm not sure what the differences here are but my changes did not change testing1
TESTING1 screenshot: https://docs.google.com/leaf?id=0B0F8GZ4RI4ZDM2I5ODA5OGYtMDE3MC00Y2E0LTkxYmYtZmEzODQxYWY2NTY1&hl=en&authkey=CJz_zdwE
TESTING2 screenshot: https://docs.google.com/leaf?id=0B0F8GZ4RI4ZDYWY0NjU5ODMtOWJkYS00NzE3LWEwN2EtM2M2ZTRhY2Y2Nzcw&hl=en&authkey=CKLI4b4H
on page load if a js error is encountered when animating form drawers or drawing the timeline, the whole interface breaks. The reporter views have standard forms (we lose WYSIWYG forms) and the drawers all default to open. The timeline causes this case on some occasions and #145 also causes this issue.