We've been using the module without a problem on many sites (upwards of 50) ... there have been no issues until a few days ago, when each site started reporting conversion failures. This still continues.

Is there an API change with Scribd that needs to be changed in the module? This is on multiple sites with various different Scribd accounts, so it is not limited to a server, site or account issue.

CommentFileSizeAuthor
#11 ipaper-handleEmpty-1441230-11.patch529 bytesrymo

Comments

duvahazard’s picture

Since the day before yesterday a site we created also is having problems converting files. Actually the files do upload to the server and to scribd but a conversion error appears. As soon as I get to my laptop I'll post all the messages and things I tried. Untill this bug report, we tought we where the only ones with this problem.

murfi’s picture

same problem here; this is the error in the log:

Scribd error #: <?xml version="1.0" encoding="UTF-8"?><rsp stat="ok"><doc_id>81721380</doc_id><access_key>key-...</access_key><secret_password>...</secret_password></rsp>

and in the page: "The previous attempt to convert this document to an iPaper failed. Click here to retry"
on each retry the file is uploaded again (as a distinct file) on scribd; we ended with a lot of copies of each file on scribd

Surf New Media’s picture

Yes, those are the same errors we are getting as well ... I cannot find any API changes in Scribd .... Same deal as well with retrying the conversion, it shows as individual documents on Scribd, but still errors on the website.

murfi’s picture

there's an error in scribd.php
the comparison operator should be '==='; otherwise, the comparison returns true even if $result is an object

240c240
< 		if($result == FALSE){
---
> 		if($result === FALSE){

this change seems to solve the upload problem; i don't know git so i can't prepare a proper patch right now; sorry

murfi’s picture

there's one more error reported with the change above; on $scribd->changeSettings call the result is empty, with only the attribute 'stat' set to 'ok'; that call should return "1", not the empty string (otherwise is interpreted as a failed call)

240c240
< 		if($result == FALSE){
---
> 		if($result === FALSE){
267a268
> 					if (!$result) return "1";
Surf New Media’s picture

I have tried these changes to one site so far and it works like a charm. Thank you!

andrewbenkard’s picture

@murfi - THANKS that worked for me too.

no_idea_yet’s picture

murfi you're a lifesaver - site just went live at a fairly major launch and had to get another publication up yesterday only to hit this problem. Your fix worked a treat; much appreciated :)

Júlio Boaro’s picture

Worked! :) Thanks!

rymo’s picture

Version: 6.x-1.1 » 6.x-1.x-dev
Category: support » bug
Priority: Major » Critical
Status: Active » Needs review
StatusFileSize
new529 bytes

murfi's changes worked for me. attached here as a patch (syntax slightly modified) that can be applied to both 5.x (what I've tested on) and 6.x branches.

FYI: the code in error came from a contributed library listed at http://www.scribd.com/developers/platform, and the latest download there appears unchanged.

Anonymous’s picture

Thanx for the patch. It works wonderfully. :)

Ashaw33’s picture

Priority: Critical » Minor

Perfect! This is the fix. Thank you so much.

uccio’s picture

the patch work!

mrP’s picture

Priority: Minor » Normal
Status: Needs review » Reviewed & tested by the community

Any chance we can get this rolled into dev?

mitchellecohen’s picture

I had similar problems with ipaper version 6.x-1.1; downloaded to Scribd but to ipaper. The patch above worked except that it did not show the download. However, it did download the thumbnail to the correct file on the server requiring a manual upload of the thumbnail. When I requested help from Scribd, they wrote back

"Drupal incorporates an outdated version of our embedded reader which we no longer support. As such, there is not much more I can do to assist you beyond recommending our new HTML5 embed frame. My apologies for any inconvenience this may cause.

Best regards,
Gary Villalobos
Scribd, Inc. "

Ipaper with Scribd is a great module; I hope it is updated to reflect the changes made by Scribd in their embed reader.

viktor.mastoridis’s picture

Thank you Murfi and Rymo, solved it for me for D6