Title: gdoc query shortcode causes &#8216;invalid JSON response&#8217; error when saving
Last modified: March 29, 2020

---

# gdoc query shortcode causes ‘invalid JSON response’ error when saving

 *  [mvanturnhoutziggonl](https://wordpress.org/support/users/mvanturnhoutziggonl/)
 * (@mvanturnhoutziggonl)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/gdoc-query-shortcode-causes-invalid-json-response-error-when-saving/)
 * Hi,
 * first of all, I’ll quickly state my specs. My site is running on:
    – PHP 7.2.29(
   Apache) – WordPress 5.3.2 – the following plugins: Contact Form 7, Events Made
   Easy, NextGEN gallery, ShortPixel image optimizer, W3 Total Cache, WP-Optimize
   and Yoast SEO.. and Inline Google Spreadsheet viewer of course.
 * I am an administrator of the website and I’ve enabled the possibility to SQL 
   query in the settings. However, when I want to insert the [gdoc] shortcode in
   a normal page, things go awry.
    – All goes well when only using [gdoc] shortcode
   itself – The moment I want to query with either [gdoc key=”wordpress”] or [gdoc
   key=”mysql: etc”] and I want to save the page, a red alert appears, saying: ‘
   The response is not a valid JSON response’.
 * Checking the POST call WordPress makes when clicking the save button and it returns
   the following error:
    ‘<h1>Error thrown</h1><p>Call to a member function has_cap()
   on boolean</p>’
 * I’m out of ideas. Can anyone help me?

The topic ‘gdoc query shortcode causes ‘invalid JSON response’ error when saving’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/inline-google-spreadsheet-viewer.
   svg)
 * [Inline Google Spreadsheet Viewer](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/)
 * [Active Topics](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/reviews/)

## Tags

 * [query](https://wordpress.org/support/topic-tag/query/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)
 * [sql](https://wordpress.org/support/topic-tag/sql/)

 * 0 replies
 * 1 participant
 * Last reply from: [mvanturnhoutziggonl](https://wordpress.org/support/users/mvanturnhoutziggonl/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/gdoc-query-shortcode-causes-invalid-json-response-error-when-saving/)
 * Status: not resolved