Hello, when I add a file to a content type with the Embedded Google Docs viewer, I'm not getting any result, i.e., the iFrame isn't displaying.

No error messages are being reported, it simply has no effect. I've gone through the instructions to install the module and set up the file with the formatter. I'm able to upload a file, it just doesn't display. When I view the HTML for the page, I don't see any code which might be created by the module, there is an empty DIV tag right underneath my content for that page, but I'm not sure if that's where the iFrame would be placed.

I'm using Drupal core version 7.10. Thanks!

Issue fork gdoc_field-1429900

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jmarkel’s picture

What OS/browser (including version number) are you experiencing this on? What sort of document (pdf, word, excel, etc)?

krak’s picture

I have this error only in Google Chrome last stable. FF, Yandex Chrome show all types correctly.

krak’s picture

I try open this page in Anonymous mode, iframe load correctly. All modules switch off.

filouzito’s picture

I have the same problem , the iframe display in preview mode only :-(
it's possible that's come from a another module?

filouzito’s picture

Hi ,
I have found the problem for the display , just a bad config in display fields

DestryT’s picture

Is safari able to display gdoc's iframe?

erilot’s picture

This issue still exists. I'm able to view the iFrame content in Firefox, Safari, and IE9/10. Chrome (Windows 28.0.1.1500.95 m & Mac 28.0.1500.71) creates the iFrame, but there's nothing in it: just <head></head><body></body>.

There is some noise on a Wordpress site about similar problems for a Google Docs Viewer plugin there, so this looks like a breakdown between Google Chrome and (ironically) Google Docs. Oops.

Given that, I don't think this is a problem with the module, but I can't use it if my Chrome users just see empty boxes.

That's unfortunate. I've never tried to hustle an issue through the Chrome bug reporting system, has anyone here done it?

Luis Delboy’s picture

No iframe displaying.
I currently have 3 sites where this module is key, with hundreds of documents. It used to work like a charm. However, in the past few days iframes do not show any documents. Just a blank space. I am running the latest version of Drupal 7 and the latest version of the module. Any ideas?
By the way, your demo site at http://testbed7.m-so.com/content/simple-page-using-embedded-google-docs-... is not working either

diddism’s picture

It needs to be https instead of http.

Fix it by changing this:
$element[$delta]['#markup'] = '<iframe class="gdoc-field" src="http://docs.google.com/gview?embedded=true&url=' . $encoded_url . '"></iframe>';

in
$element[$delta]['#markup'] = '<iframe class="gdoc-field" src="https://docs.google.com/gview?embedded=true&url=' . $encoded_url . '"></iframe>';

in line 82 of gdoc.field.module

pfaocle’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Category: Support request » Feature request
Issue summary: View changes
Status: Active » Needs review
FileSize
963 bytes

Here's a very minimal patch that simply replaces the use of "http" or "https" with a protocol-relative URL.

cmseasy’s picture

works

Webbeh’s picture

This is a trivial change, and a dang shame it was never committed to the 7.x branch 6 years ago (!!!!).

I'm going to go ahead and create a fork, MR, and commit this in, given that #9-11 are the most recent comments on this issue.

Webbeh’s picture

Well, this is interesting - the old maintainer added this, but did not use the patch here: https://git.drupalcode.org/project/gdoc_field/-/commit/703e1f5e045586049...

Resolving the issue with the work done in #10, and finally attaching credits here.

Webbeh’s picture

Status: Needs review » Fixed

Thank you to folks who confirmed the fix works, as well as those who diagnosed a potential solution. Patch in #10 merged via MR.

Status: Fixed » Closed (fixed)

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