This sounds like a great module, highly useful at out company. Will keep an eye.

Is anybody actually using this module successfully?

Thanks!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

k.dani’s picture

Hi Exploratus,

Thank you for your intrest in the google drive sync module. We've been using this module in test phase since it was released and it worked successfully for a while, but we discovered a bug in the authentication method, some users' access token couldn't be refreshed.

We have investigated this and try to fix the problem as soon as possible.

All the best,
Daniel

merauluka’s picture

Is there an update on the state of this module?

I'm very interested in using it, but I haven't had any luck getting it to work.

-Melissa

k.dani’s picture

Status: Active » Postponed (maintainer needs more info)

Hi Merauluka,

I would be very happy if I could help you. Could you please write me some information about the problem?

Thanks,
Daniel

codekarate’s picture

I also had a bug with authentication after the cache expired. I added a simple hack to the module and it seems to be working again. My modified function is listed below (my changes are inside the @HACK comment).

Seems to be an issue with an object getting returned when the code is expecting an array (at least for my problem).

function google_drive_sync_get_userinfo($handler, $credentials) {
  $users_info = &drupal_static(__FUNCTION__);

  if ($users_info && isset($users_info[$credentials['uid']])) {
    $user_info = $users_info[$credentials['uid']];
  }
  else {
    // Get user info from cache, if it is available, or send a request to google.
    $cache = cache_get("googledrive:userinfo:{$credentials['uid']}");

    if (!$cache) {
      $user_info = $handler->GetUserInfo($credentials);
      cache_set("googledrive:userinfo:{$credentials['uid']}", $user_info, 'cache', time() + $credentials['expires_in']);
    }
    else {
      $user_info = $cache->data;
    }
    
    // @HACK
    if (!is_array($user_info)) {
      $user_info = get_object_vars($user_info);
    }
    // end @HACK
    
    $users_info[$credentials['uid']] = $user_info;
  }

  return $user_info;
}
merauluka’s picture

My issue is twofold. I have created the API on Google (which I didn't know how to do, so I probably did that wrong) and I have a "Client ID for web applications" and a "Client ID for Drive SDK" section both with Client IDs and Client Secrets.

I've tried both ways, but I can't get the module to synchronize any documents. I tell it to synchronize, but when it shows the progress bar it says "Synchronizing 1 of 0" and nothing happens.

I know that I have public documents in there. I'm not sure what is going on...

k.dani’s picture

Hi merauluka,

Thank you for your intrests in our module. You need "Client ID for web application" to be able to use the module properly.

Client ID for web applications

Base on your feedback, I think the problem was that you didn't have any users whom drupal accounts had been connected to their google accounts.

Google Drive Block

There is a block which contains a link(you have to place it in a region, the block is disabled by default). You can connect your existing account(or create a new account on drupal side) with this link. If you didn't do this, you wouldn't be able to sync anything.

If accounts were connected, the synchronization should work.
Please give it a try and let me know the results.

Best wishes,
Daniel

k.dani’s picture

Hi smthomas,

Thanks for your help, your "hack" seems good to me. I will add this to the dev version.

Daniel

merauluka’s picture

Thank you so much for the detailed reply. I checked your settings against mine and they appear okay. I had, at one point, enabled the block for connect to Google Drive, but I removed it again. I enabled it, and connected okay.

Then when I tried to synchronize it gave me this error.

merauluka’s picture

So this error was because my site was running PHP 5.2, not 5.3. I've updated my version and it synchronized, but it only synchronized one file and I know there are several hundred. Also, the synchronized file is nowhere to be found on my site.

merauluka’s picture

Ha! I had to increase the memory_limit setting in my php.ini file and it worked. Apparently I had over 5,000 files. Whoa!

k.dani’s picture

Status: Postponed (maintainer needs more info) » Fixed

Thanks merauluka to share your observations with us. It's really helpful for everyone who want to use this module.
I think I can close this issue. If other problem will be found, you can open another ticket for it.

Status: Fixed » Closed (fixed)

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

akumaownz’s picture

Title: Is anybody actually using this module successfully? » Couple of Questions

Hello,

I am keen to get this working .

I am just not sure to put in the URIs and JavaScript settings on the google api side of things and then back into drupal

Currently I just put my website url in the Redirect URIs and nothing in the JavaScript, but after I click the Connect with Google Drive I click through all the connections steps but then when it redirects back to my site I don't get any own documents link in the side bar.

k.dani’s picture

Status: Closed (fixed) » Fixed

You have two separated problems, if I see it right.

1, Configuring "Client ID for web application" on Google side and Drupal side as well
Redirect URI: http://DOMAIN/goauth/authenticate
Javascript origins: http://DOMAIN/ (if you try it in local enviroment, you shouldn't use virtual hosts, because google can't handle it)

2, Managing documents
After you have connected your drupal account with your google account, your gdocs get synchronized, but you won't have any overviews or listing pages by default. I recommend to read the following article how you can set up a document management system with this module: http://pronovix.com/blog/kdani/drupal-front-end-google-drive-ii
The "Own documents" link(page) is generated by views, so it implies some extra configuration beside the GDS module.

akumaownz’s picture

Thanks but after I updated those setting I get

Fatal error: require_once() [function.require]: Failed opening required '/home/account/public_html/domain.com//src/Google_Client.php' (include_path='.:/usr/local/lib/php') in /home/account/public_html/domain.com/sites/all/modules/google_drive_sync/GoogleDriveAuthHandler.class.inc on line 44

Status: Fixed » Closed (fixed)

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

Sakerius’s picture

Hello,

I am currently trying to get this to work. I installed all modules created google id & secret - when I click the "Connect with Google Drive" and "accept" I get redirected to a 'white screen of death'.

going back to homepage I get this:

Warning: require_once(/var/www/vhosts/XXXXXXX/httpdocs//src/Google_Client.php): failed to open stream: No such file or directory in GoogleDriveAuthHandler::loadLib() (line 44 of /var/www/vhosts/dupontinvent.de/httpdocs/sites/all/modules/google_drive_sync/GoogleDriveAuthHandler.class.inc).

Any ideas what I might have done wrong?

merauluka’s picture

Issue summary: View changes

Sakerius,

It is bad form to resurrect old threads. Please create a new one and reference this one if it applies to your issue.

Trust me. It'll save you heartache when dealing with issue queues in general.

Cheers!
Melissa