• Resolved chenryahts

    (@chenryahts)


    When I added a new Organization to the plugin without including an address, I get the following error code:

    Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\xampp\htdocs\wordpress2\wp-content\plugins\wp-crm-system\includes\wcs-fields.php on line 371
    
    Warning: file_get_contents(https://maps.google.com/maps/api/geocode/json?address=+++++): failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\xampp\htdocs\wordpress2\wp-content\plugins\wp-crm-system\includes\wcs-fields.php on line 371

    This is a local installation, but it would seem that it’s trying to parse a field that it should know is empty.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I can’t seem to reproduce that error on my localhost install.

    Could you open the file wp-crm-system\includes\wcs-fields.php in a text editor (Notepad, etc.) and replace the two lines around line 417-418 and 457-458 that look like this:

    // get latitude, longitude and formatted address
    $data_arr = geocode( $addressString );

    …with this:

    $data_arr = false;
    if ( $addressString ){
        // get latitude, longitude and formatted address
        $data_arr = geocode( $addressString );
    }

    If that corrects the error for you, please let me know and I’ll put out an update to address this.

    • This reply was modified 7 years, 8 months ago by Scott DeLuzio.

    The fix I suggested above was released in version 2.0.23 of the plugin.

    I’m marking this resolved, but if the issue persists, please open a new support thread.

    Thread Starter chenryahts

    (@chenryahts)

    Cool, sorry, I haven’t had a chance to test it. But it seems like it’ll fix the problem

    Thanks

    Great, if it doesn’t fix it, please let me know and I’ll dig into it a bit more.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Debugging Error When Address is Omitted from Organization’ is closed to new replies.