Este es el foro de soporte técnico de WPML, el plugin multilingüe de WordPress.

Todas las personas pueden leerlo pero solo los clientes de WPML pueden ingresar comentarios. El equipo de WPML responde en el foro 6 días a la semana, durante 22 horas por día.

This topic contains 5 respuestas, has 2 mensajes.

Last updated by Bobby hace 6 meses.

Assigned support staff: Bobby.

Autor Publicaciones
abril 17, 2019 a las 9:30 pm #3634813

duverJ

He actualizado woocommerce a su última versión Version 3.6.0, y la tienda dejó de funcionar, arroja un error de timeout. Al desactivar el plugin de woocommerce multilingual, la tienda funciona con normalidad.

PHP Fatal error: Maximum execution time of 60 seconds exceeded in /var/www/html/wp-includes/functions.php on line 4284

then...
PHP Fatal error: Maximum execution time of 60 seconds exceeded in /var/www/html/wp-includes/class-wp-hook.php on line 288

then...

PHP Fatal error: Maximum execution time of 60 seconds exceeded in /var/www/html/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/classes/class-wpml-sp-user.php on line 19

Finally had to disable the plugin.

abril 18, 2019 a las 7:08 am #3636687

Bobby
Supporter

Languages: Inglés (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

This error seems to happen due to your max_execution_time

if possible please increase it to 300 or higher and let me know your results

=> hidden link
=> hidden link

abril 18, 2019 a las 10:16 pm #3641957

duverJ

Hi Bobby, it was working normally before with 60 seconds as max_execution_time. I have a VPS server running my site, so it's capable. I changed this value anyway as you instructed, but it's still causing the same error when woocommerce multilingual is activated. I also updated to today's woocommerce update v 3.6.1 which seemed to solve some php issues, but that doesn't fixed the issue with your plugin.

abril 19, 2019 a las 9:00 pm #3648191

Bobby
Supporter

Languages: Inglés (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

I would need to see the detail of the error log if possible . You can see how to enable debug logging here:
https://wpml.org/documentation/support/debugging-wpml/

Go in your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:
define('WP_DEBUG', true);

Edit your wp-config.php file and add these lines, just before it says 'stop editing here':

ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');

This will create an error_log.txt file in your site's root directory. Please send me its contents.

abril 22, 2019 a las 5:13 pm #3657387

duverJ

The error is always a timeout and it's very random, it occurs in random files.

[22-Apr-2019 16:48:48 UTC] PHP Fatal error:  Maximum execution time of 120 seconds exceeded in /var/www/html/wp-includes/class-wp-post.php on line 265
[22-Apr-2019 16:53:28 UTC] PHP Fatal error:  Maximum execution time of 120 seconds exceeded in /var/www/html/wp-content/plugins/woocommerce-multilingual/classes/media/class-wcml-product-gallery-filter.php on line 19

Thinking in the possible issue with your plugin, i'm using: wcml_client_currency hook in my functions.php file according to documentation, here is my implementation:


/* Get country code by IP */
function get_country_by_ip(){
    $location = WC_Geolocation::geolocate_ip();
    $country = $location['country'];

    return $location['country'];
}


/* Set currency based on geolocation */
function geo_client_currency($client_currency){
    $country = get_country_by_ip();
    switch ($country) {
        case "CO":
            $client_currency = 'COP';
            break;
        case "BE":
        case "BG":
        case "CZ":
        case "DK":
        case "DE":
        case "EE":
        case "IE":
        case "EL":
        case "ES":
        case "FR":
        case "HR":
        case "IT":
        case "CY":
        case "LV":
        case "LT":
        case "LU":
        case "HU":
        case "MT":
        case "NL":
        case "AT":
        case "PL":
        case "PT":
        case "RO":
        case "SI":
        case "SK":
        case "FI":
        case "SE":
        case "UK":
            $client_currency = 'EUR';
            break;
        default:
            $client_currency = 'USD';
    }
    // if(get_client_ip() === '79.145.199.116') {
    //     $client_currency = 'COP';
    // }
    return $client_currency;
}
 
add_filter('wcml_client_currency','geo_client_currency', 10, 1);

Please let me know if you can spot any issue with it.

abril 23, 2019 a las 6:41 am #3659785

Bobby
Supporter

Languages: Inglés (English )

Timezone: America/Los_Angeles (GMT-07:00)

As a test what are your results if you comment out this custom code ? This will allow us to pinpoint if that might be causing it.

let me know your results please. From what i can see in the code i cant notice something that might cause such behavior but if disabling it resolves the issue i will need to further examine it

El debate ‘[Cerrado] Compatibility with WooCommerce Version 3.6.0’ está cerrado y no admite más respuestas.