4ndygu / civicrm_osdi

An Extension for importing from and exporting to OSDI endpoints from CiviCRM
Other
4 stars 4 forks source link

civiendpointimport #32

Open 4ndygu opened 6 years ago

johntwyman commented 6 years ago

I manually committed this change and unfortunately the error persists. I've tried with my browser in incognito mode too.

I also tried filling in the OSDI endpoint (root) input field in the Import section but still saw the error. osdi_export_error

4ndygu commented 6 years ago

hmm, seems like this would be a javascript error with the following blob:

    var data = new Object();

    var formResults = CRM.$("#OSDIExportForm").serializeArray().map(function(x){
        data[x.name] = x.value;}
    ); 

     var endpoint = data["civiendpoint"];
    var endpointroot = data["civiendpoint"];
     if (endpoint.indexOf("actionnetwork.org") !== -1) {
        endpointroot = endpointroot.substring(0, endpointroot.indexOf("/people"));
     } else {
        endpointroot = endpointroot.substring(0, endpointroot.indexOf("/civicrm"))
            + "/civicrm";
     }

I'm still unable to replicate the error, but could you let me know what happens if you output some of this code in your console?

Additionally, could you supply the /people endpoint, rather than the root?

4ndygu commented 6 years ago

ah - i can replicate it now. If you supply the actual /people endpoint rather than the root, this should work!