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.
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/…..
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
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.
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 !
You’re welcome
If you have any further issues with the plugin, please feel free to reach out to us.