I'm having problems uploading documents through iPaper after a server move (and yes, I did add the new server on Scribd), and have tried to solve that problem by uploading to Scribd and embedding with keys and codes.

But even though I have not enabled the signature function, the embedded document still won't show, and Scribd says "Security failure - signature mismatch". But I have no signature! Neither in iPaper nor on Scribd.

ANy ideas?

Martin

Comments

arpieb’s picture

I'm running into the same problem on D6.15. Does anyone know why this is happening? I have the API key and API secret configured in iPaper, the domain added to the Scribd.com domain list (isettasrus.com), and have set "Require API Signature" to both required and not, no luck...

I'm actually trying to link to a previously uploaded private file on Scribd.com with the following share code from the document detail page (no longer private I guess with this posting, but it's not a critical document):

WordPress Embed Code
[scribd id=24664038 key=key-2b3g7wj1s7fg7kbx1j8y]

Fullscreen URL
http://www.scribd.com/full/24664038?access_key=key-2b3g7wj1s7fg7kbx1j8y

Document Page URL
http://www.scribd.com/doc/24664038/Motocoupe-BMW-Isetta-250-300-Parts-Ca...

It looks like the required fields to link to an existing doc from an iPaper node are gelled from these various embed forms, so I'm using:

doc_id: 24664038
secret_password: 2oplih2g5iwz2bhddald
access_key: key-2b3g7wj1s7fg7kbx1j8y

Am I missing something or using incorrect values when trying to link to an existing file?

Thanks!

-R

rares’s picture

what you are doing sounds good: pasting the 3 values into an ipaper node under the respective fields.
could you also paste the embed code that appears when you view that node? maybe something is wrong there? also, can you try to paste the exact same code on your old site? if it works there, then this is an issue that you should contact scribd about directly.

vertikal.dk’s picture

And returning again here!

I managed to get all previous issues of my magazine to work: left everything fully open and public on Scribd and used the doc ID and aceess key only in Drupal. It worked. It's not ideal for a commercial magazine, but it works.

Out comes the January issue. Upload, edit, into create iPaper in Drupal and enter the right numbers and... aaaarrrghhhh! "Signature mismatch" again!

There's absolutely no difference on my site or on Scribd between the magazines that work and the ones that don't. Not that I see anyway - only the ID and the key.

Why this now!? I'm getting pretty frustrated!

Martin

rares’s picture

for troubleshooting purposes, please paste the embed code that the Drupal site is generating.

vertikal.dk’s picture

Tried to do some tracking, mainly to post the embedding code here, but it seems that iPaper embeds the document using some JavaScript in stead of plain HTML.

  <script type=text/javascript src='http://www.scribd.com/javascripts/view.js'></script>
  <div id='embedded_flash_25778272'>
    <a href='http://www.scribd.com'>Embedded Scribd iPaper - Requires Javascript and Flash Player</a><br />
  <!-- no text -->

  </div>
  <script type=text/javascript>
    var scribd_doc = scribd.Document.getDoc(25778272, 'key-2j1nso3sy7sxr4727vaw');
    scribd_doc.addParam( 'jsapi_version', 1 );
    
    scribd_doc.addParam('use_ssl', true);
    scribd_doc.grantAccess('admin', 'ce1a92d1506b08cc1401396f06ea3899', '81c48b03034981fd5049e69a2bc74980'); 
  
    scribd_doc.write('embedded_flash_25778272');

  </script>

Does not work, but gives the signature failure.

There might be a good reason for this, but why not just insert standard embed HTML? If I do that manually in a document, all works dandy.

<a title="View SF_0110 on Scribd" href="http://www.scribd.com/doc/25778272/SF-0110" style="margin: 12px auto 6px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block; text-decoration: underline;">SF_0110</a> <object id="doc_95309204573028" name="doc_95309204573028" height="600" width="100%" type="application/x-shockwave-flash" data="http://d1.scribdassets.com/ScribdViewer.swf" style="outline:none;" >		<param name="movie" value="http://d1.scribdassets.com/ScribdViewer.swf">		<param name="wmode" value="opaque"> 		<param name="bgcolor" value="#ffffff"> 		<param name="allowFullScreen" value="true"> 		<param name="allowScriptAccess" value="always"> 		<param name="FlashVars" value="document_id=25778272&access_key=key-2j1nso3sy7sxr4727vaw&page=1&viewMode=book"> 	</object>

Works as a charm.

Martin

rares’s picture

This line of code

    scribd_doc.grantAccess('admin', 'ce1a92d1506b08cc1401396f06ea3899', '81c48b03034981fd5049e69a2bc74980'); 

shows that the ipaper module has stored this as a secure node (Secure iPaper?:checked). when you create the node you should leave the secure option disabled and then it should work.

vertikal.dk’s picture

Solved! Or at least I found a way to get it to work here.

The key was the iPaper option Secure iPaper: Allow Embedding. If this option is set to Disallow, which can only be done while creating the iPaper, the system embeds with JavaScript and I get the signature failure. I noticed that all the other magazines were embedded with HTML, and by checking the module code I could see that the secure iPaper was the key.

But you can't change this back, once it's set. It's disabled in the form, so either you have to create your iPaper again or go into the database, find the "ipaper" table and set the field "secure" to 0.

This did it for me! No error and no embedding problems.

So it might be the secure option that triggers the error.

Martin

rares’s picture

Status: Active » Fixed

Yes, this is the solution: you must set Secure ipaper to 'allow embedding' when creating the node. the option cannot be changed after the node is created because an ipaper that was created as secure cannot be downgraded and vice-versa.

arpieb’s picture

rares,

Here is the embed code from my site for that document:

  <script type=text/javascript src='http://www.scribd.com/javascripts/view.js'></script>
  <div id='embedded_flash_24664038'>
    <a href='http://www.scribd.com'>Embedded Scribd iPaper - Requires Javascript and Flash Player</a><br />
  
  </div>
  <script type=text/javascript>
    var scribd_doc = scribd.Document.getDoc(24664038, 'key-2b3g7wj1s7fg7kbx1j8y');
    scribd_doc.addParam( 'jsapi_version', 1 );
    
    scribd_doc.addParam('use_ssl', true);
    scribd_doc.grantAccess('admin', 'bd42e8dcu75vhvsb9p0hat3pe5', '69da7fc198e75eb0eaf7aa4aea1ce5d0'); 
  
    scribd_doc.write('embedded_flash_24664038');
 
  </script>

I notice that there is no use of the "secret key" for the document (it's a "private" document) that was entered during the node creation. Is that maybe what is causing the problem, and Scribd is just returning a generic "authentication failed" error?

Interestingly enough, the "Download document as PDF" link that I enabled for the document works...

Any help would be greatly appreciated as the customer is now asking for multiple documents to be available on their website and I need to sort this out ASAP.

Thanks!

-R

rares’s picture

Status: Fixed » Active

As I explained to vertical.dk, the line

scribd_doc.grantAccess('admin', 'bd42e8dcu75vhvsb9p0hat3pe5', '69da7fc198e75eb0eaf7aa4aea1ce5d0'); 

shows that this was created as a secure document. You need to create this as a document with Secure ipaper set to "allow embedding"
The secret key is not necessary in the embedding process; it is only necessary to create the URL that is used to view the document on scribd.com

vertikal.dk’s picture

rares,

Thanks for replying! I found the solution just as you posted yours.

It might be a good idea to explain this feature slightly better and mention in the form that it's a point of no return.
I guess I understand what it does, disallowing further document embedding, but I hadn't captured the further implications of this setting.

And I honestly can't see why even admin shouldn't be able to override the initial setting. This could be a separate permission setting allowing certain roles to downgrade security.

Martin

rares’s picture

Status: Active » Fixed

the setting is problematic only if you plan to embed documents created outside your Drupal site (a feature only a few people use). I will mention this in the documentation nonetheless.
Note that the help text for that field does say : "Note that this setting cannot be changed once the iPaper has been created"

vertikal.dk’s picture

Status: Fixed » Active

rares,

I did see that it can't be changed, but that I had no idea that it would render my embedded documents useless - for whatever reason. That was what I meant. I have battled this problem in several rounds during the last month or more, and just wanted to ensure that other users could be spared that experience.

Thanks anyhow, and thanks for a great module!

Martin

arpieb’s picture

Status: Active » Fixed

Got it working perfectly once I set the embed option to "allow" on the linked documents. My biggest concern was that then the document embedding info would be made available to users, but found the permissions allow me to disable embedding by role, so we're good to go!

The reason I went with external documents hosted on Scribd.com was that I am quickly running out of space on the hosted server (the client has loaded hundreds - maybe over a thousand by now - hi-res images into galleries). These documents are scans of large books that I don't want to take up any space on the client's server if possible.

Thanks for the help!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.