• Resolved carnetsdemontagne

    (@carnetsdemontagne)


    Hello,

    I have several tables on my website that are linked to Google Sheets.

    It was working well but since few days, these tables are empty (No available data in this table) though I did not change my documents Google Sheets.

    When I try to create a new table, I have an error message saying that my spreadsheet has no line.

    Thanks in advance for your help

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • I have a similar issue and found your table working on your site page shared. Was it a fleeting issue or did you figure out a solution, @carnetsdemontagne?

    Thanks in advance for sharing your experience.

    Plugin Author wpDataTables

    (@wpdatatables)

    Hi there,

    After investigation, we found out that your link in converted in this after CURL call

    <HTML> <HEAD> <TITLE>Temporary Redirect</TITLE> </HEAD> <BODY BGCOLOR=”#FFFFFF” TEXT=”#000000″> <H1>Temporary Redirect</H1> The document has moved here https://doc-10-60-sheets.googleusercontent.com/pub/&#8230;..

    The described behavior is a feature:

    https://developers.google.com/apps-script/guides/content#redirects

    RedirectsFor security reasons, content returned by the Content service isn’t served from script.google.com, but instead redirected to a one-time URL at script.googleusercontent.com. This means that if you use the Content service to return data to another application, you must ensure that the HTTP client is configured to follow redirects.
    What you can try is to add this code in file wp-content/plugins/wpdatatables/source/class.wdttools.php around line 205 you will find this:

    curl_setopt($ch, CURLOPT_REFERER, site_url());

    and below that add this code

    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

    We need to test more but for now it is working in all test cases.

    Sorry for inconvenience,

    Can confirm that code works. I was experiencing the exact same issue. Inserted that code, all google sheet tables work again.

    Thank you!

    Will your source code keep this update going forward or will we need to tweak the code after each new release? Thanks for the additional information.

    Take care,
    Jean

    Plugin Author wpDataTables

    (@wpdatatables)

    Hi there,

    Yes, this or corrected version of code (depends on testing) will be included in next update you don’t have to worry about that.

    Thanks again!

    Plugin Author wpDataTables

    (@wpdatatables)

    You are welcome.

    Thread Starter carnetsdemontagne

    (@carnetsdemontagne)

    Hi,

    @jeeni Meanwhile, I tried to create a new document, copy and paste my table and generate a new link and it worked but only temporarily.

    @wpdatatables Thanks a lot for your help, it works !

    Plugin Contributor ameliabooking

    (@ameliabooking)

    .

    • This reply was modified 4 years, 5 months ago by ameliabooking.
    Plugin Author wpDataTables

    (@wpdatatables)

    You’re welcome

    If you have any further issues with the plugin, please feel free to reach out to us.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Tables from Google Sheets’ is closed to new replies.