I 'fixed' my crank too. Took it all apart and off the truck, saw how it worked and what was broke, put it back on to see what location it had to be in to allow the hinged knob to pop back in the assembly when the window was up and down. Took it apart again and jb welded that sum biotch. It still goes up and down but you just can't lock it. Be prepared for rusted out tracks and broken plastic pieces. I have zip ties holding some of my old plastic together. Regrease everything too.
My guess as to why the glass broke when the gate was shut was because the glass comes very close to part of the wind up assembly and IIRC there is a piece that if installed backwards will rub the glass. I could see where a little knock from closing the gate could shatter it.