Have you enabled your Drive API to your project? I had a similar problem and that was the solution for me.
Create a new app project over at https;//console.developers.google.com. Make sure to enable the Drive API within the project (under APIs & Auth/APIs/Google Apps APIs/Drive API)
This forum post covered a lot of issues – https://wordpress.org/support/topic/error-redirect_uri_mismatch-4?replies=11
I’m no expert, but I’m happy to help if I can. You can hit me up on GChat during the work day (9am-5pm PST aka -7GMT) at tara (dot) kerwin (at) gmail.
Thanks for your reply tararebeka.
Yes I have enabled the api and set up the redirect url. When using the plugin I actually get to the Google page which asks for the api permission. I get the impression I wouldn’t get that far if the api wasn’t enabled in the developer console. Also, the plugin gets to ‘connected’.
Do you know what should happen when I click the accept button as per the screen grab I linked to in my original post?
Matt
It should bounce you back to the Settings page in your site.
You can try resetting the secret in the Google App, then re-entering it into your settings.
And this may not pertain to you, but I use two different Google IDs when I’m at work. I had a lot of trouble because I didn’t realize that it was always looking for stuff in whatever Google ID I was logged into at the time, rather than what was entered in the settings. I had to make sure that I was logged into Google with the same account I had used for my apps, otherwise it just wouldn’t work. Still happens when I run the cron to get my monthly articles even though everything is setup correctly.
Thanks. I’ll give that a try when I’m back at work on Thursday. And also make sure I’m signed in correctly.
Matt
Good luck. I know how frustrating it can be.
Well, the frustration is building!
So, I am now running on a local wordpress install so i have greater control and freedom to hack things about.
I have deleted any google app projects i had been experimenting/learning with and created a fresh one. I have also re-installed the Docs to WP plugin and cleared the database entries for the ID and Secret. I have updated to WP 4.2.2. PHP is running at Version 5.5.3. and Docs to WP is V1.1.
I am now further ahead than i was on Monday as i can now click on Settings > Docs to WP and the side bar and it returns the correct settings page with the status of ‘connected’. This is after i accepted the api permission page. I can now see the ‘auth token’ refresh when i reload the page and i see the requests appear in the graph on the overview page for the app in the Google developer console.
However, the posts still aren’t pulling through! I was getting the error “Syntax error, malformed JSON.” in the Abstract_Api.php. Reading this topic: https://wordpress.org/support/topic/10-beta-questionsissues?replies=26 i have tried removing the following code:
switch (json_last_error()) {
case JSON_ERROR_NONE:
$error = null; // JSON is valid
break;
case JSON_ERROR_DEPTH:
$error = 'Maximum stack depth exceeded.';
break;
case JSON_ERROR_STATE_MISMATCH:
$error = 'Underflow or the modes mismatch.';
break;
case JSON_ERROR_CTRL_CHAR:
$error = 'Unexpected control character found.';
break;
// only PHP 5.3+
case JSON_ERROR_UTF8:
$error = 'Malformed UTF-8 characters, possibly incorrectly encoded.';
break;
case JSON_ERROR_SYNTAX:
$error = 'Syntax error, malformed JSON.';
break;
default:
$error = 'Unknown JSON error occured.';
break;
}
if( !empty( $error ) ) {
throw new JsonException($error);
}
I now no longer get any errors but still no posts! grrr.
Can anyone help?? :-/
Thanks.
Matt
Breakthrough!! 🙂 – check your folder paths!
I though i would give the origin and destination folder values a check and they looked odd! Along the lines of “https://drive.google.com/folderview?id=folderview?id=0AvbaiFDF9adfs8ALJDfadsf9JLKSDFjavadvasdf&usp=sharing”
(note the double folderview?id=. I removed this and the id value below the field updated to the equivalent of: “0AvbaiFDF9adfs8ALJDfadsf9JLKSDFjavadvasdf”.
After editing both folder fields and running the cron it now works!! 🙂
Although i am left with an entry in the error log that looks like this after the import has finished: https://docs.google.com/feeds/download/documents/export/Export?id=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX_MsOtxY8&exportFormat=html (id replaced with X’s).
Do i need to worry about this?
Also, it seems that all Bold and Italic formatting is being stripped on import. Is there a reason for that? I notice this topic mentions it too: https://wordpress.org/support/topic/bolditalic-links-categories-authors-no-longer-transfer?replies=2.
thanks all.
Matt
Congratulations!
And yeah, we’re all still waiting on the bold/italics issue. Hands are tied until the busy guys in Bangor can fix it.
Just adding a note to point to my latest post about a fix for the bold and italic styling. See my post here
Glad to hear this got resolved!