Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author EDGARROJAS

    (@edgarrojas)

    Hello!

    Are you getting this error when trying to export to csv or pdf?

    Thread Starter johnelder

    (@johnelder)

    I get it as soon as I hit the export option. After searching dates and form name. It never gives me an option for csv or pdf.

    Thread Starter johnelder

    (@johnelder)

    The 400 error was being caused by the server rejecting the curly braces in the json part of the url. RFC 1738 states that they are unsafe, so some hosts are blocking them. There is a fix, but it requires modifying 2 file sin the plugin.

    Plugin Author EDGARROJAS

    (@edgarrojas)

    Oh i see could you tell me which changes would be needed? If those doesn’t affect in anything else i can add them to the plugin.

    Regards!

    Thread Starter johnelder

    (@johnelder)

    Encode the JSON part of the url in Entries_bundle.js at line 55829:

    
                encodeURIComponent(JSON.stringify({
                    Form: this.SearchedForm,
                    StartDate: this.SearchedStartDate,
                    EndDate: this.SearchedEndDate,
                    Conditions: this.SearchedAdvancedSearchIsShown ? this.SearchedConditions : [],
                    Nonce: SmartFormsEntriesVar.Nonce
                }));

    Decode the url in smart-forms-ajax.php on line 588:

        $data=RednaoJSONSanitizer::Sanitize(json_decode(stripslashes(urldecode($_GET['data']))),(object)[
           "Nonce"=>'',
            "Form"=>0,
            "StartDate"=>0,
            "EndDate"=>0,
            "Conditions"=>[(object)[
                "FieldId"=>"",
                "Comparison"=>"",
                "Value"=>"",
    
            ]]
        ]);
    Thread Starter johnelder

    (@johnelder)

    Is this change in the latest version?

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Error 400 o export’ is closed to new replies.