Support » Plugin: CF7 Google Sheets Connector » PHP Fatal Uncaught Error: Call to a member function getWorksheets()

  • Resolved gabrielhargitai

    (@gabrielhargitai)


    Hello,

    Thank you for the awesome plugin. We use the free version and have trouble making the third contact form work. The access token is the same and we have triple-checked the sheet name, columns names and the sheet name.

    Upon sending, the circle keeps spinning and the browser shows a wp-json error, with the following error log in the apache log:

    Uncaught Error: Call to a member function getWorksheets() on null in /var/sitename/wp-content/plugins/cf7-google-sheets-connector/lib/google-sheets.php:75\nStack trace:\n#0 /var/sitename/wp-content/plugins/cf7-google-sheets-connector/includes/class-gs-service.php(174): CF7GSC_googlesheet->add_row(Array)\n#1 /var/sitename/wp-includes/class-wp-hook.php(286): Gs_Connector_Service->cf7_save_to_google_sheets(Object(WPCF7_ContactForm))\n#2 /var/sitename/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)\n#3 /var/sitename/wp-includes/plugin.php(465): WP_Hook->do_action(Array)\n#4 /var/sitename/wp-content/plugins/contact-form-7/includes/submission.php(213): do_action('wpcf7_mail_sent', Object(WPCF7_ContactForm))\n#5 /var/sitename/wp-content/plugins/contact-form-7/includes/submission.php(33): WPCF7_Submission->submit()\n#6 /var/sitename/wp-content/plugins/contact-form-7/includes/contact-form.php(729): WPCF7_Submission::g in /var/sitename/wp-content/plugins/cf7-google-sheets-connector/lib/google-sheets.php on line 75, referer: https://sitename/subpage/

    Any hint on where to go from here?

    Thank you in advance!

    Cheers,
    Gabor

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Abdullah WesternDeal

    (@westerndeal)

    Hi @gabrielhargitai,

    Thanks for using our plugin.

    The error “Uncaught Error: Call to a member function getWorksheets() on null” occurs if sheet is not available in the account with which you have integrated. Can you check ?

    Else again do integration with your account with fresh new authentication code and than check if that works.

    Let us know.

    Thanks
    Abdullah

    gabrielhargitai

    (@gabrielhargitai)

    Hi @westerndeal,

    Thanks for the prompt reply! So it’s actually the Google Sheets API that is denying write access for your plugin.

    Yep, I tried creating a new sheet with my own credentials and the same thing happens. Triple checked the column names as well, even for dangling whitespace characters!

    What is weird is that I already have two sheets that are working as expected (same user), it is the third one that I have this trouble with.

    Plugin Author Abdullah WesternDeal

    (@westerndeal)

    Hi @gabrielhargitai,

    Were you able to connect with your third sheet or you are still facing any issue ?

    Thanks
    Abdullah

    Hi @westerndeal,

    Actually our client is now off for a few weeks – she will return shortly and we will look at the issue then. We do have the Sheet created with out G Suite account, but it is strange that the two previous ones work.

    Will report back once the project is continued, thanks for the stellar support!

    Cheers,
    Gabor

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.