WordPress.org

Support

Support » Plugins and Hacks » UpdraftPlus Bad Response for Google Drive

UpdraftPlus Bad Response for Google Drive

  • Hi,

    I’ve installed Updraftplus, Ive entered all the correct details for Google drive, Client secret and Client ID both correct.

    When i click on the authorisation link and allow i get a red banner at the top of the plugin page saying ‘Bad Response’

    Any ideas on how to fix this? Any help much appreciated…

    P.s i’m using version 1.3.15

Viewing 15 replies - 1 through 15 (of 20 total)
  • David Anderson
    Participant

    @davidanderson

    Thanks… on the Google API entry corresponding to the client key, you have a JavaScript origin of example.com instead of your own website’s domain name.

    Thanks for your reply, I’ll go that now,

    For some reason wordpress generates this url – http://1050228110.test.prositehosting.co.uk

    should i use the one above or http://completemuscleandfitness.com

    David Anderson
    Participant

    @davidanderson

    Use the one WordPress advises you.

    David

    I’m still getting bad response error….

    David Anderson
    Participant

    @davidanderson

    Screenshot please! Of the error.

    David Anderson
    Participant

    @davidanderson

    Try turning off any cacheing plugins that you’ve got, and clear your cache. Then try agani.

    Disabled W3 Total Cache and emptied page cache and still have the error…

    David Anderson
    Participant

    @davidanderson

    Edit the plugin file updraftplus/methods/googledrive.php (WordPress has a built-in plugins editor which you can use).

    On line 83 is this:

    header(‘Location: ‘.admin_url(‘options-general.php?page=updraftplus&error=’ . __( ‘Bad response!’, ‘backup’ ) ) );

    Change it to:

    header(‘Location: ‘.admin_url(‘options-general.php?page=updraftplus&error=’ . __( ‘Bad response!’ . print_r($result, true), ‘backup’ ) ) );

    Then try again. You will now have some more garbage alongside the words “Bad response”. Copy-and-paste that garbage for me.

    No ‘Bad response’ appeared but i got this error at the top of the page –

    Warning: Header may not contain more than a single header, new line detected. in E:\Domains\c\completemuscleandfitness.com\user\htdocs\wp-content\plugins\updraftplus\methods\googledrive.php on line 83

    http://www.screencast.com/t/WzeV0zcODVc

    It also says i have a backup but there is no backup in Google Drive.

    David Anderson
    Participant

    @davidanderson

    Sorry – what I gave you didn’t work. Remove that line, and instead add these ones:

    $add_to_url = "Bad response from Google: ";
    foreach ( $result->get_error_messages() as $message ) {
    	$this->log("Google Drive authentication error: ".$message);
    	$add_to_url .= "$message. ";
    }
    header('Location: '.admin_url('options-general.php?page=updraftplus&error='.urlencode($add_to_url)) );

    Ok, I’m going to be away from my PC for about 20 mins.

    When I get back ill change the file and post the results.

    Thanks again for your help

    I now get this –

    Fatal error: Using $this when not in object context in E:\Domains\c\completemuscleandfitness.com\user\htdocs\wp-content\plugins\updraftplus\methods\googledrive.php on line 85

    David Anderson
    Participant

    @davidanderson

    Argh – I sent you more faulty code. Remove those lines that I sent before, and use these:

    $add_to_url = "Bad response from Google: ";
    foreach ( $result->get_error_messages() as $message ) {
    	global $updraftplus;
    	$updraftplus->log("Google Drive authentication error: ".$message);
    	$add_to_url .= "$message. ";
    }
    header('Location: '.admin_url('options-general.php?page=updraftplus&error='.urlencode($add_to_url)) );
Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘UpdraftPlus Bad Response for Google Drive’ is closed to new replies.