From: Demian K. <dem...@vi...> - 2013-02-06 16:57:24
|
I don't think many people have used the print functionality, so nobody has caught this before... but I was able to reproduce the problem. Since location/call number information is loaded via AJAX, what seems to be happening is that the print dialog box is popping up before the details load in, and thus you end up printing out a copy with "Loading..." in place of useful information. Evidently, at least in Firefox, the print dialog prints the page in the state it held at the time the box popped up, so it doesn't matter if you wait for data to load before clicking OK - you still get the incomplete page. If you cancel the dialog, then open it again, you get all the details on the print out. The best solution would be to prevent the print dialog from opening until the page is fully loaded... but I have a feeling that tying the print functionality to the completion of the AJAX request might get complicated, especially since the print function operates in different contexts, not all of which are going to involve AJAX requests. A cruder, less reliable, but simpler solution would be to put the print operation on a timer, so the box doesn't pop up until a few seconds after the page loads in order to give time for everything to populate properly. Obviously this could still cause intermittent problems if a network glitch caused slower-than-expected performance. The current print-related code can be found in common.js if you want to experiment with different approaches. Let me know if you need more help, and please share any solution(s) you come up with. Also feel free to open a JIRA ticket if you want this fixed but don't have time to do it yourself; I have other things I need to focus on right now, but I can probably spend more time on this eventually. - Demian From: Jon Singletary [mailto:jw...@an...] Sent: Tuesday, February 05, 2013 6:14 PM To: vuf...@li... Subject: [VuFind-General] VuFind printing Hello, We are experiencing print errors in VuFind 1.3 when users add search results to the book bag. The book bag print option launches a print-preview browser tab, and an automatic print dialog. On our prints, the call# and location are missing but everything else shows normally. Has anyone run into this problem and found a solution? Thanks for your help, Jon Jon Singletary, Library Systems Specialist, Carnegie Mellon University, jw...@an... |