Closed (fixed)
Project:
iPaper
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Jul 2008 at 15:29 UTC
Updated:
19 May 2012 at 16:37 UTC
Jump to comment: Most recent file
have uploaded a powerpoint as Ipaper content type and the node is listed with a white thumbnail and not the powerpoint thumbnail and when the pointer hovers over this white thumbnail it says
Thumbnail not yet available'
is this a bug?
| Comment | File | Size | Author |
|---|
Comments
Comment #1
rares commentedSee http://drupal.org/node/265278#comment-880162. Thumbnails are fetched on cron runs, and only if the document is available in the search index on scribd. I'll make a not about this in the next version of the readme file.
Comment #2
nirvanajyothi commentedok.Have run cron and it showed "The directory sites/default/files/ipaper_thumbs has been created."
But the thumbnail is not available still.
will the documents be indexed on scribd as you mentioned if they have been set to private and so will the thumbnails be created for private documents.
Comment #3
nirvanajyothi commentedcan something be done about thumbnail for private documents?
Comment #4
nirvanajyothi commentedthe thumbnail foor a document i uploaded at my site as private using iPaper has become available today...so i think its possible(it took long though..)
"Give me a place to stand and I shall move the Earth"
-Archimedes
Comment #5
rares commentedit takes a while, but there is no way around this unfortunately.
Comment #6
nirvanajyothi commentedk.i have changed the emmpty.jpg into a ppt icon...its better to have a sumdin than a white photo i thought...is that alright?
Comment #7
nirvanajyothi commentedhave set cron to run automatically every 5 minutes.Now the thumbnails appear much faster.thats wonderful.
Comment #8
rares commentedComment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #10
techninja commentedI was having these same problems, except NONE of my thumbnails would load for days, and I figured to do something about it. After some research into the API, it turns out that the proper function to ask the Scribd API for information about specific documents is "getSettings". By first making a list of the published doc_ids, then sendign that to scribd for each one, you can return the thumbnail for each one. I wrapped this around the already existing loop function inside ipaper_cron and, TADA! near instant thumbnails.
In truth, I have not been able to test what happens when the thumbnail is not yet available, but the original code had plenty of error catches, which should cover this.
I haven't yet made a proper patch, so for now, this just replaces the entire ipaper_cron hook function in the 6.x-1-beta version
This also applies a quick string replace to grab the "large" thumbnail version.
If anyone wants to test (Though it seems to work pretty darn well for me) let me know how it goes.
This code currently doesn't implement any means of checking to see what images have already been grabbed, making cron loads inefficient. With a little tweaking, the images listed in the folder could be added as a not in list to the query and we'd be spot on. If I get a request for that, i'd be glad to add it.
Comment #11
rares commentedthis is great! I had never seen the thumbnail being returned anywhere other than docs.search(). Apparently getSettings does it too, which will hopefully put an end to one of the module's greatest drawbacks.
I will test this and make a new release.
Comment #12
techninja commentedGreat!
The code I mentioned to fix the update to check to see if there were any images made yet (instead of going and getting all of them regardless of if they existed or not), I went ahead and made anyway, so the code below should work more efficiently :)
Comment #13
rares commentedSo I figured that since it's so easy to get a thumbnail, why not get it when the node is saved.
I also added a function to allow the user to clear all the thumbnails.
Comment #14
rares commentedComment #15
rares commentedimmediate thumbnail downloads and custom thumbnail sizes have been included in release candidate 2. Please go to the module settings page after you upgrade the module.
Comment #16
nirvanajyothi commentedtested iPaper 6.x-rc2 locally.working alright.
-thank you techninja and rares!
Comment #17
techninja commentedThanks again, and great work rares getting those changes in so quickly!
Though, if you could add one more option to the setup form.. One of my servers is acting up and refuses to grab the images properly using cURL, but will work just fine with the fsockopen fallback. Perhaps a "don't use curl for grabbing thumbnails" option?
Thanks again!
Comment #18
techninja commentedOh and not to be picky or anything, if the image is grabbed too soon before the document has completed converting, the thumbnail will only return an appropriate icon of the document type being converted. Perfectly appropriate for momentary presentation! But fairly inappropriate for a module that assumes the first image that is returned with the function is the one and only image for the node :P
I have personally not come up with any solutions for this, other than perhaps paying attention to the conversion status flag inside the getSettings return data, and not saving the thumbnail then, grabbing it only with a cleanup cron hook to later. And to think we were out of cron land for a little while!
I'd imagine grabbing the fulltext for a document would have to work similarly for longer conversion time documents.
Comment #19
stangslvr commentedI am having the same issue as techninja. The thumb is coming back as the pdf logo or even blank, as its pulling the thumbnail before its fully processed. Anyone have any suggestions for a delay or pause before it grabs the thumbnail? Thanks
PS. Going back after and clicking the rebuild cache button seems to grab the thumbnail.
Comment #20
rares commentedI'm adding code to -dev (there will be a rc3 release shortly) that waits for two minutes before attempting to pull the thumbnail. if you want a different value search for 120 in ipaper.module. in my tests it has been enough. i think it only really needs a few seconds.
also, now, if you save the ipaper again (go to edit, click submit), it will get the thumbnail again - just in case you got the word or pdf icon.
Comment #22
milplus commenteddear sir
thanks for your mod.
can you tell me where I have to place this code.
I'm assuming into the ipaper module replacing the ipaper.module cron function pre existing.pls confirm.
again I have same issue I've tried to replace that funcion with yours but I'm getting error in row 708. where the code is starting.
hope you can give me a good tip.
thanks
Comment #23
milplus commenteddear sir
thanks for your mod.
can you tell me where I have to place this code.
I'm assuming into the ipaper module replacing the ipaper.module cron function pre existing.pls confirm.
again I have same issue I've tried to replace that funcion with yours but I'm getting error in row 708. where the code is starting.
hope you can give me a good tip.
thanks
Comment #24
onderd commentedi have 6.x-1.1. but have the same issue.