• Hi,
    I did the update and found that indeed new short codes are available for widgets.
    But I decided to on my test site. these are the error messages I get like warning message:

    Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /htdocs/lab.eurekaconseil.net/wp-content/plugins/coronavirus-covid-19/coronavirus-covid-19.php on line 120

    Warning: file_get_contents(https://salamzadeh.net/api/get_covid19_widget?country=Iran): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /htdocs/lab.eurekaconseil.net/wp-content/plugins/coronavirus-covid-19/coronavirus-covid-19.php on line 120

    Here is the short code that I insert in my page :
    [COVID-19]
    [COVID-19-WIDGET country=”Iran” darkmode=”true”]

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Sasan Salamzadeh

    (@salamzadeh)

    hi dear friend,
    go to line 120 of the /htdocs/lab.eurekaconseil.net/wp-content/plugins/coronavirus-covid-19/coronavirus-covid-19.php and remove the https:// from start of the api address,if the problem does not resolve please you send me the website login information to check.
    https://salamzadeh.net/contact

    Thread Starter leunamme

    (@leunamme)

    Hi bro,
    How are you ? I checked line 120 of the file, it is empty. It does not contain any lines of code.
    This is the widget code block. It starts from line 107 to 127:(maybe you will see where the problem is coming from. In the worst case via TeamViwer you will be able to see)

    /**
    
     * Load Widget Style and Scripts
    
     *
    
     * @since 1.1.0
    
     */
    
    function covid19_widget_styles()
    
    {
    
    	$dir = plugin_dir_url(__FILE__);
    
    	wp_enqueue_style('covid_19_styles', $dir . 'assets/css/widget.css', array(), COVID19_VERSION, 'all');
    
    }
    • This reply was modified 4 years, 11 months ago by leunamme.
    Plugin Contributor Sasan Salamzadeh

    (@salamzadeh)

    i’m fine thanks, and you?
    are you sure? i checked again the file
    line 114 to 123 of coronavirus-covid-19.php should be like bellow

    /**
     * Get Widget Data From New API
     *
     * @since 1.1.0
     */
    function covid19_get_api_data($params) {
    	$response = file_get_contents('https://salamzadeh.net/api/get_covid19_widget?country='.$params["country"]);
    	$response = json_decode($response);
    	return $response;
    }

    and you need just remove https:// from start of address.

    Thread Starter leunamme

    (@leunamme)

    Very sure.

    I tried to replace the piece of code I sent you with the one you just pasted me. The result is that WordPress crashed.

    Fatal error: Cannot redeclare covid19_get_api_data () (previously declared in /htdocs/wp-content/plugins/coronavirus-covid-19/coronavirus-covid-19.php:54) in / htdocs / wp-content / plugins / coronavirus-covid -19 / coronavirus-covid-19.php on line 114
    A critical error has occurred on your site. Please check the inbox of your site’s administration email for more information.

    I had to remove the plugin and there everything is fine. I’m going to redownload it and try again

    Plugin Contributor Sasan Salamzadeh

    (@salamzadeh)

    i don’t know why your file line number is different with my file.
    if the problem is not solved please contact with me from my website and send me anydesk ID to connect and check it on your pc

    Thread Starter leunamme

    (@leunamme)

    OK i juste come to send acces TeamViwer by your contact Form on your website

    Plugin Contributor Sasan Salamzadeh

    (@salamzadeh)

    I read this sort of error can be fixed with this PHP setting:

    allow_url_fopen = On

    please check this setting on your hosting.

    Plugin Contributor Sasan Salamzadeh

    (@salamzadeh)

    Hi dear @leunamme ,
    Please update your plugin to 1.3.0 version and let me know your issue status

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Warning error’ is closed to new replies.