WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form DB
CFDB with Google Spreadsheet = error 500 (25 posts)

  1. antonism
    Member
    Posted 1 year ago #

    Hello, awesome plugin.
    Im using it for 4+ months without a glich, the last few days i get an error 500 as a popup in function in the google spread sheet. I updated to latest version but still I get the same.

    I got Contact form 7, and 24 results in the db i try to fetch.

    I copy below the interesting parts of the error message (the rest is formating code)

    error: Request failed for http://u*gr/wp-login.php?redirect_to=wp-admin/admin-ajax.php%3Faction%3Dcfdb-export%26form%3D%CE%93%CE%AF%CE%BD%CE%B5%CF%84%CE%B5%2B%CE%BC%CE%AD%CE%BB%CE%BF%CF%82%2B%CF%84%CE%B7%CF%82%2B%CE%88%CE%BD%CF%89%CF%83%CE%B7%CF%82%2B%CE%86%CE%B8%CE%B5%CF%89%CE%BD. returned code 500. Server response:
    <lots of formating code here></head> <body id="error-page"> <p>You do not have sufficient permissions to access this data.</p></body> </html> (line 86, file "Code 002")

    (line 86, file "Code 002") refers to the following line of code on the Google Spreadsheet (exact line marked in strong)

    function fetchCF7ToDBCSVResponse(siteUrl, formName, search, user, pwd) {
    var encformName = encodeURI(formName).replace(new RegExp("%20", "g"), "%2B");
    var url = siteUrl + "/wp-login.php?redirect_to=wp-admin/admin-ajax.php%3Faction%3Dcfdb-export%26form%3D" + encformName;
    if (search != null && search != '') {
    url += '%26search%3D' + encodeURI(search);
    }
    return UrlFetchApp.fetch(
    url,
    {
    method: "post",
    payload: "log=" + encodeURI(user) + "&pwd=" + encodeURI(pwd)
    });
    }

    since i havent changed anything in the credits of the user I use to log on, or in the function calling, or or.. im stuck. please help :)

    http://wordpress.org/extend/plugins/contact-form-7-to-database-extension/

  2. antonism
    Member
    Posted 1 year ago #

    update that I hope you find helpfull on bug-hunting.
    I tried with version 2.5, I get the exact same error.
    Wordpress Version 2.5.1
    Wordpress Contact Form 7 (in the array says "_wpcd_version 3.3.1")

    It works (latest version) with Excel External Query (the thing that you download a file, put credentials and fills excel with data) with the same credentials giving "no permission" error (500) when trying to fetch from google spreadsheet.

  3. jtherieau
    Member
    Posted 1 year ago #

    Exact same thing here. "error: Request failed for http://g*.org/wp-login.php?redirect_to=wp-admin/admin-ajax.php%3Faction%3Dcfdb-export%26form%3DAdoption%2BApplication returned code 500. Server response: <!DOCTYPE html>... etc etc etc...<p>You do not have sufficient permissions to access this data.</p></body> </html> (line 66, file "Code")

    We have had errors on and off for years since linking the CF7 database to Goggle Spreadsheet Live. I think it's something on the Google side, not the CF7 plugin. It eventually seems to resolve itself, though we suspect is has, on occasion, been something to do with the Google spreadsheet size limit. We sometimes clear out our dB, or spreadsheet, or both, which gets the thing running again. Just did that, but as of right now, we're still getting the error, so no idea what's up with it this time.

  4. antonism
    Member
    Posted 1 year ago #

    after your note i renamed the form and base to be something simple ("bemember") (to rule out some naming conversion problem, or something alike), but the error its still the same. I think the login works properly, because changing the credentials you get different errors indicating that login failed. I also cleared the database, having only a testing entry didnt change anything.

  5. antonism
    Member
    Posted 1 year ago #

    I reinstalled this plugin on wordpress site, deleting assosiate files, but still same error. What is frustrating is that using the link in the error in the firefox address bar downloads the correct csv file.

  6. Michael Simpson
    Member
    Plugin Author

    Posted 1 year ago #

    I did a quick test myself and I am also see the 500 error. I don't know what is going on yet. I hope to have time to debug it this week.

  7. antonism
    Member
    Posted 1 year ago #

    thank you michael, we look forward!

  8. kppbchema
    Member
    Posted 1 year ago #

    Any news about this error? I have many google spreadsheet using this feature and now I'm down!!

    Thanks Michael.

  9. Michael Simpson
    Member
    Plugin Author

    Posted 1 year ago #

    I have looked at it, but I haven't worked out the problem yet. When I go through the steps manually in my browser it works, but via the Google API it is not getting past the WP login.

  10. azghanvi
    Member
    Posted 1 year ago #

    A quick patch that worked for me.

    1) contact-form-7-to-database-extension/ExportToCsvUtf8.php: Added new If and commented old if.

    if($_REQUEST["secret"] != "redacted"){
    $this->assertSecurityErrorMessage();
    return;
    }
    /*
    // Security Check
    if (!$this->isAuthorized()) {
    $this->assertSecurityErrorMessage();
    return;
    }
    */

    2) In Code.gs (script editor) added secret param.

    url += '%26'+encodeURI("secret=redacted");
    return UrlFetchApp.fetch(
    ...

    Hope it help as a temporary alternate,till actual fix is there.

  11. bizwizkid
    Member
    Posted 1 year ago #

    Hi Azghanvi. I tried this but, am still getting an error message that reads:

    "error: Request failed for http://mydomain.com/wp-login.php?redirect_to=wp-admin/admin-ajax.php%3Faction%3Dcfdb-export%26form%3DKeywords returned code 500. Server response:
    You do not have sufficient permissions to access this data.
    (line 66, file "Code")"

    Also, in your #2 in the Code.gs I think there was a missing } bracket inbetween the lines and should be:

    url += '%26'+encodeURI("secret=redacted");
    }
    return UrlFetchApp.fetch(

    Also, my code in #2 started like this (which includes the search element):

    url += '%26search%3D' + encodeURI(search);
    }
    return UrlFetchApp.fetch(

    So, I effectively replaced the first url line with yours.

    If you can lend any help that would be great. Bottom line is I'm still getting the above error message.

    Thanks!

  12. bizwizkid
    Member
    Posted 1 year ago #

    Ok, got this working. My issue was that I erased the "optional search" words but, left the parentheses. In any case I simply copies and pasted this from the code I put in with the script editor and everything instantly populated.

    =CF7ToDBData("http://domain.com", "formName", "optional search", "WPadminLogin", "WPadminPassword")

    Thanks much.

  13. antonism
    Member
    Posted 1 year ago #

    workaround worked for me too. just a note, you can (and you should) replace words "secret" and "redacted" with something random, long and very difficult to guess, as a minimal security measure. As i far i can understand this overruns original security check with a "variable equals word" check. Use at your own risk.

    thanks for posting workaround.

  14. mililand
    Member
    Posted 1 year ago #

    Hi
    is there a fix for that?
    i am getting an error (500) on connecting to google docs (it worked before...)
    thanks
    mili

  15. otterlei@gmail.com
    Member
    Posted 1 year ago #

    We are getting the following response.

    returned code 500. Server response: <!DOCTYPE html> <!-- Ticket #11289, IE bug fix: always pad the error page with enough characters such that it is greater than 512 bytes, even after gzip compression abcdefghijklmnopqrstuvwxyz1234567890aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz11223344556677889900abacbcbdcdcededfefegfgfhghgihihjijikjkjlklkmlmlnmnmononpopoqpqprqrqsrsrtstsubcbcdcdedefefgfabcadefbghicjkldmnoepqrfstugvwxhyz1i234j567k890laabmbccnddeoeffpgghqhiirjjksklltmmnunoovppqwqrrxsstytuuzvvw0wxx1yyz2z113223434455666777889890091abc2def3ghi4jkl5mno6pqr7stu8vwx9yz11aab2bcc3dd4ee5ff6gg7hh8ii9j0jk1kl2lmm3nnoo4p5pq6qrr7ss8tt9uuvv0wwx1x2yyzz13aba4cbcb5dcdc6dedfef8egf9gfh0ghg1ihi2hji3jik4jkj5lkl6kml7mln8mnm9ono --> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>WordPress &rsaquo; Error</title> <style type="text/css"> ....</style> </head> <body id="error-page"> <p>You do not have sufficient permissions to access this data.</p></body> </html> (line 94, file "Code")

    The export to Excel Internet Query is working fine.

    Did something change in WordPress do you think? Or did the Google Spreadsheet functions change where its not posting correctly.

    I can do a curl from the command line and login fine with the same URLs the plugin gave me.

  16. larrie
    Member
    Posted 1 year ago #

    @Michael Simpson - Any update/fix to your plugin that solves the Exporting to Google Spreadsheet Live Data issue?

    I followed all your instructions but still got this error:

    error: Address unavailable: http://www.domain.com/wp-login.php?redirect_to=wp-admin/admin-ajax.php%3Faction%3Dcfdb-export%26form%3DContact%Form (line 66, file "Code")

  17. antonism
    Member
    Posted 1 year ago #

    after some recent update on wordpress above workaround broke, getting same error (500)

  18. antonism
    Member
    Posted 8 months ago #

    you can use the workaround discribed above.
    (i managed to make it work again, need a small edit in the worpress files.)
    if you have any working alternative please tell.

  19. mtbmtb
    Member
    Posted 8 months ago #

    please can you post your latest workaround

  20. antonism
    Member
    Posted 8 months ago #

    it is exactly what "bizwizkid" posted 5 months ago with the notion of changing the words like i mentioned on the post right after the post of "bizwizkid".

  21. nightsmusic
    Member
    Posted 5 months ago #

    I'm getting the same 500 error and I'm sorry, I must be really stupid, but I have no idea where to paste the workaround. Can someone point me in the right direction? If anyone can give me the line before the paste of new code, I'd appreciate it. I really need to get this working.

  22. ericno7
    Member
    Posted 5 months ago #

    I had the 500 error on a clients website.

    If you turn on error reporting you should see an error rather than the unhelpful 500 internal server error (depending on your server) e.g:
    error_reporting(1);

    This aspect of the plugin relies on Zend Framework inclusion so if you dont have the Zend framework available on your server it wont work. This was the case for my client.

  23. nightsmusic
    Member
    Posted 5 months ago #

    That's true if you're using the Google Spreadsheet option. I want to use the Google Live Data. I get the Zend error message with the former, but not with the latter and others who have gotten the Live Data to work have not mentioned the Zend framework at all.

    I just want to know where to paste the code. I don't write code, I'm usually pretty good at figuring it out but in this case, nothing has worked. I wouldn't even know where to turn on the error reporting.

  24. dirk norris
    Member
    Posted 5 months ago #

    Any progress on this error? I am getting it too.

  25. blackessej
    Member
    Posted 4 months ago #

    Here's the error I'm getting:

    Request failed for http://www.bellinghamultimate.org/wp-login.php?redirect_to=wp-admin/admin-ajax.php%3Faction%3Dcfdb-export%26form%3DSpring%2BLeague%2BRegistration returned code 503. Truncated server response: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>503 Service Temporarily Unavailable</title> </head><body> <h1>Service Tempor... (use muteHttpExceptions option to examine full response) (line 66, file "Code")

    I've tried all of the above, to no avail...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.