Salta la navigazione

Questo è il forum di assistenza tecnica di WPML, il plug-in multilingue di WordPress.

La sua lettura è permessa a tutti, ma la pubblicazione è riservata esclusivamente ai clienti di WPML. Il team di WPML risponde sul forum 6 giorni su 7, 22 ore su 24.

Sun Mon Tue Wed Thu Fri Sat
- 11:00 – 15:00 11:00 – 15:00 11:00 – 15:00 11:00 – 15:00 11:00 – 15:00 -
- 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 -

Fuso orario del fornitore: Europe/Rome (GMT+01:00)

Questo ticket contiene 17 risposte, ha 2 voci.

Ultimo aggiornamento da Laura 7 mesi, 2 settimane fa.

Assistito da: Laura.

Autore Messaggi
Aprile 16, 2024 a 4:14 pm #15527116

hospitexI

Ogni volta che il vostro plugin fa gli aggiornamenti in automatico il nostro sito crasha e dobbiamo ripristinarlo.
Non siamo in grado di risolvere il problema.

Aprile 16, 2024 a 4:47 pm #15527315

Laura
Supporter

Lingue: Inglese (English ) Italiano (Italiano )

Fuso orario: Europe/Rome (GMT+01:00)

Salve,

grazie per averci contattato.

Se il sito va in crash, dev'esserci un errore critico. Senza sapere quale, non siamo in grado di fornire assistenza.

Attiva il debug.log di WordPress e riproduci il problema, l'errore dovrebbe comparire lì
https://wpml.org/it/documentazione/informazioni-per-gli-sviluppatori/eseguire-il-debug-di-wpml/

Aprile 16, 2024 a 5:12 pm #15527403

hospitexI

Purtroppo devo fare ricrashare il sito, ora non riesco, lo faccio giovedì e vi ricontatto. Grazie

Aprile 16, 2024 a 5:18 pm #15527436

hospitexI

Ho ricreato l'errore.
Dopo aver fatto l'aggiornamento di WordPress, ecco l'errore che esce:

Fatal error: Maximum execution time of 120 seconds exceeded in /home/customer/www/hospitex.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/utilities/class-debug-backtrace.php on line 68

errore WPML.png
Aprile 16, 2024 a 6:47 pm #15528039

Laura
Supporter

Lingue: Inglese (English ) Italiano (Italiano )

Fuso orario: Europe/Rome (GMT+01:00)

Nel debug.log ci dev'essere una stack trace, da solo l'errore non dice molto.

Aprile 17, 2024 a 6:49 am #15529539

hospitexI

Dove lo prendo il debug log? Non potendo accedere al CMS

Aprile 17, 2024 a 8:12 am #15530059

Laura
Supporter

Lingue: Inglese (English ) Italiano (Italiano )

Fuso orario: Europe/Rome (GMT+01:00)

Come spiegato nella documentazione, il debug.log è un file che si trova nella cartella wp-content. Non si può prendere accededendo al backend di WordPress, devi cercare tra i file del sito.

Gli hosting solitamente offrono un file manager, se non sei sicuro di come fare chiedi al supporto.

Aprile 17, 2024 a 8:14 am #15530064

hospitexI

Eccolo:

<?php

namespace WPML\Utils;

/**
* Class DebugBackTrace
*
* @package WPML\Utils
*/
class DebugBackTrace {

/** @var array */
private $debug_backtrace = [];

/** @var int */
private $limit;

/** @var bool */
private $provide_object;

/** @var bool */
private $ignore_args;

/** @var string */
private $debug_backtrace_function;

/**
* DebugBackTrace constructor.
*
* @param int $limit
* @param bool $provide_object
* @param bool $ignore_args
* @param null|string $debug_backtrace_function
*/
public function __construct(
$limit = 0,
$provide_object = false,
$ignore_args = true,
$debug_backtrace_function = null
) {
if ( ! $debug_backtrace_function ) {
$debug_backtrace_function = 'debug_backtrace';
}
$this->limit = $limit;
$this->provide_object = $provide_object;
$this->ignore_args = $ignore_args;
$this->debug_backtrace_function = $debug_backtrace_function;
}

/**
* @param array $functions
* @param bool $refresh
*
* @return bool
*/
public function are_functions_in_call_stack( array $functions, $refresh = true ) {
if ( empty( $this->debug_backtrace ) || $refresh ) {
$this->get_backtrace();
}

$found = false;
foreach ( $this->debug_backtrace as $frame ) {
if ( isset( $frame['class'] ) ) {
$frame_function = [ $frame['class'], $frame['function'] ];
} else {
$frame_function = $frame['function'];
}
if ( in_array( $frame_function, $functions, true ) ) {
$found = true;
break;
}
}
return $found;
}

/**
* @param string $function_name
* @param bool $refresh
*
* @return bool
*/
public function is_function_in_call_stack( $function_name, $refresh = true ) {
return $this->are_functions_in_call_stack( [ $function_name ], $refresh );
}

/**
* @param string $function_name
* @param bool $refresh
*
* @return int
*/
public function count_function_in_call_stack( $function_name, $refresh = true ) {
if ( empty( $this->debug_backtrace ) || $refresh ) {
$this->get_backtrace();
}

$count = 0;
foreach ( $this->debug_backtrace as $frame ) {
if ( ! isset( $frame['class'] ) && $frame['function'] === $function_name ) {
$count ++;
}
}

return $count;
}

/**
* @param string $class_name
* @param string $function_name
* @param bool $refresh
*
* @return bool
*/
public function is_class_function_in_call_stack( $class_name, $function_name, $refresh = true ) {
return $this->are_functions_in_call_stack( [ [ $class_name, $function_name ] ], $refresh );
}

/**
* @return array
*/
public function get_backtrace() {
$options = false;

// As of 5.3.6, 'options' parameter is a bit mask for the following options.
if ( $this->provide_object ) {
$options |= DEBUG_BACKTRACE_PROVIDE_OBJECT;
}
if ( $this->ignore_args ) {
$options |= DEBUG_BACKTRACE_IGNORE_ARGS;
}

$actual_limit = 0 === $this->limit ? 0 : $this->limit + 4;
$this->debug_backtrace = (array) call_user_func_array(
$this->debug_backtrace_function,
[
$options,
$actual_limit,
]
); // Add one item to include the current frame.

$this->remove_frames_for_this_class();

return $this->debug_backtrace;
}

private function remove_frames_for_this_class() {
/**
* We cannot rely on number of frames to remove.
* php 5.6 and 7+ provides different call stacks.
* php 5.6 adds call_user_func_array from get_backtrace()
*/
do {
$found = false;

if ( ! isset( $this->debug_backtrace[0] ) ) {
break;
}
$frame = $this->debug_backtrace[0];

if (
( isset( $frame['file'] ) && __FILE__ === $frame['file'] )
|| ( isset( $frame['class'] ) && self::class === $frame['class'] )
) {
$found = true;
$this->remove_last_frame();
}
} while ( $found );

$this->remove_last_frame(); // Remove frame with the function called this class.
}

public function remove_last_frame() {
if ( $this->debug_backtrace ) {
array_shift( $this->debug_backtrace );
}
}
}

Aprile 17, 2024 a 8:47 am #15530253

Laura
Supporter

Lingue: Inglese (English ) Italiano (Italiano )

Fuso orario: Europe/Rome (GMT+01:00)

Non so cosa sia questo file, ma non è un log di errore.

Aprile 17, 2024 a 8:50 am #15530273

hospitexI

L'errore dovrebbe essere su questo file:

<?php

namespace WPML\Utils;

/**
* Class DebugBackTrace
*
* @package WPML\Utils
*/
class DebugBackTrace {

/** @var array */
private $debug_backtrace = [];

/** @var int */
private $limit;

/** @var bool */
private $provide_object;

/** @var bool */
private $ignore_args;

/** @var string */
private $debug_backtrace_function;

/**
* DebugBackTrace constructor.
*
* @param int $limit
* @param bool $provide_object
* @param bool $ignore_args
* @param null|string $debug_backtrace_function
*/
public function __construct(
$limit = 0,
$provide_object = false,
$ignore_args = true,
$debug_backtrace_function = null
) {
if ( ! $debug_backtrace_function ) {
$debug_backtrace_function = 'debug_backtrace';
}
$this->limit = $limit;
$this->provide_object = $provide_object;
$this->ignore_args = $ignore_args;
$this->debug_backtrace_function = $debug_backtrace_function;
}

/**
* @param array $functions
* @param bool $refresh
*
* @return bool
*/
public function are_functions_in_call_stack( array $functions, $refresh = true ) {
if ( empty( $this->debug_backtrace ) || $refresh ) {
$this->get_backtrace();
}

$found = false;
foreach ( $this->debug_backtrace as $frame ) {
if ( isset( $frame['class'] ) ) {
$frame_function = [ $frame['class'], $frame['function'] ];
} else {
$frame_function = $frame['function'];
}
if ( in_array( $frame_function, $functions, true ) ) {
$found = true;
break;
}
}
return $found;
}

/**
* @param string $function_name
* @param bool $refresh
*
* @return bool
*/
public function is_function_in_call_stack( $function_name, $refresh = true ) {
return $this->are_functions_in_call_stack( [ $function_name ], $refresh );
}

/**
* @param string $function_name
* @param bool $refresh
*
* @return int
*/
public function count_function_in_call_stack( $function_name, $refresh = true ) {
if ( empty( $this->debug_backtrace ) || $refresh ) {
$this->get_backtrace();
}

$count = 0;
foreach ( $this->debug_backtrace as $frame ) {
if ( ! isset( $frame['class'] ) && $frame['function'] === $function_name ) {
$count ++;
}
}

return $count;
}

/**
* @param string $class_name
* @param string $function_name
* @param bool $refresh
*
* @return bool
*/
public function is_class_function_in_call_stack( $class_name, $function_name, $refresh = true ) {
return $this->are_functions_in_call_stack( [ [ $class_name, $function_name ] ], $refresh );
}

/**
* @return array
*/
public function get_backtrace() {
$options = false;

// As of 5.3.6, 'options' parameter is a bit mask for the following options.
if ( $this->provide_object ) {
$options |= DEBUG_BACKTRACE_PROVIDE_OBJECT;
}
if ( $this->ignore_args ) {
$options |= DEBUG_BACKTRACE_IGNORE_ARGS;
}

$actual_limit = 0 === $this->limit ? 0 : $this->limit + 4;
$this->debug_backtrace = (array) call_user_func_array(
$this->debug_backtrace_function,
[
$options,
$actual_limit,
]
); // Add one item to include the current frame.

$this->remove_frames_for_this_class();

return $this->debug_backtrace;
}

private function remove_frames_for_this_class() {
/**
* We cannot rely on number of frames to remove.
* php 5.6 and 7+ provides different call stacks.
* php 5.6 adds call_user_func_array from get_backtrace()
*/
do {
$found = false;

if ( ! isset( $this->debug_backtrace[0] ) ) {
break;
}
$frame = $this->debug_backtrace[0];

if (
( isset( $frame['file'] ) && __FILE__ === $frame['file'] )
|| ( isset( $frame['class'] ) && self::class === $frame['class'] )
) {
$found = true;
$this->remove_last_frame();
}
} while ( $found );

$this->remove_last_frame(); // Remove frame with the function called this class.
}

public function remove_last_frame() {
if ( $this->debug_backtrace ) {
array_shift( $this->debug_backtrace );
}
}
}

Aprile 17, 2024 a 8:54 am #15530342

Laura
Supporter

Lingue: Inglese (English ) Italiano (Italiano )

Fuso orario: Europe/Rome (GMT+01:00)

Sì, ma a me serve l'errore *completo*. Che si tratta di quel file lo so già, è scritto nell'errore iniziale, ma mi serve la stack trace

Aprile 17, 2024 a 9:14 am #15530438

hospitexI

[03-Feb-2024 00:03:20 UTC] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/customer/www/hospitex.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/utilities/class-debug-backtrace.php on line 176
[removed]

Aprile 17, 2024 a 10:37 am #15531080

Laura
Supporter

Lingue: Inglese (English ) Italiano (Italiano )

Fuso orario: Europe/Rome (GMT+01:00)

Prova ad abbassare il max_execution_time a 60 (devi chiedere all'hosting) e riprova.
Oppure controlla il server error log e verifica se l'errore completo è lì.

Aprile 17, 2024 a 11:38 am #15531594

hospitexI

2024-04-17 11:09:38 UTC [nginx][error] 97436#0: *3786075 openat() "/home/u829-qj4c2qjcwnfq/www/hospitex.com/public_html/.well-known/traffic-advice" failed (2: No such file or directory), client: 66.249.81.96, server: hospitex.com, request: "GET /.well-known/traffic-advice HTTP/1.1", host: "www.hospitex.com"

2024-04-17 10:58:22 UTC [nginx][error] 97435#0: *3770497 openat() "/home/u829-qj4c2qjcwnfq/www/hospitex.com/public_html/.well-known/acme-challenge/6Q8ZSUSQ8NAYC-E_DO7FTM-P8K98SWMO" failed (2: No such file or directory), client: 93.95.216.122, server: hospitex.com, request: "GET /.well-known/acme-challenge/6Q8ZSUSQ8NAYC-E_DO7FTM-P8K98SWMO HTTP/1.1", host: "hospitex.com"

2024-04-17 10:58:22 UTC [nginx][error] 97435#0: *3770500 openat() "/home/u829-qj4c2qjcwnfq/www/hospitex.com/public_html/.well-known/acme-challenge/TEO7Z3RYUF6U82I8FUGE29FRICYWV1KL" failed (2: No such file or directory), client: 93.95.216.122, server: hospitex.com, request: "GET /.well-known/acme-challenge/TEO7Z3RYUF6U82I8FUGE29FRICYWV1KL HTTP/1.1", host: "www.hospitex.com"

2024-04-17 10:06:16 UTC [nginx][error] 97436#0: *3690305 openat() "/home/u829-qj4c2qjcwnfq/www/hospitex.com/public_html/.well-known/traffic-advice" failed (2: No such file or directory), client: 66.249.81.106, server: hospitex.com, request: "GET /.well-known/traffic-advice HTTP/1.1", host: "www.hospitex.com"

2024-04-17 08:58:21 UTC [nginx][error] 87338#0: *3580862 openat() "/home/u829-qj4c2qjcwnfq/www/hospitex.com/public_html/.well-known/traffic-advice" failed (2: No such file or directory), client: 142.250.32.5, server: hospitex.com, request: "GET /.well-known/traffic-advice HTTP/1.1", host: "www.hospitex.com"

2024-04-17 07:58:15 UTC [nginx][error] 87339#0: *3490970 openat() "/home/u829-qj4c2qjcwnfq/www/hospitex.com/public_html/.well-known/acme-challenge/CHPKMTH9GNWKD7Y62NWDRNUY9ECGG00F" failed (2: No such file or directory), client: 93.95.216.122, server: hospitex.com, request: "GET /.well-known/acme-challenge/CHPKMTH9GNWKD7Y62NWDRNUY9ECGG00F HTTP/1.1", host: "hospitex.com"

2024-04-17 07:58:15 UTC [nginx][error] 87340#0: *3490974 openat() "/home/u829-qj4c2qjcwnfq/www/hospitex.com/public_html/.well-known/acme-challenge/SDV8QRL-LW0KPPAHJ6ITGKCT_10HI_CA" failed (2: No such file or directory), client: 93.95.216.122, server: hospitex.com, request: "GET /.well-known/acme-challenge/SDV8QRL-LW0KPPAHJ6ITGKCT_10HI_CA HTTP/1.1", host: "www.hospitex.com"

2024-04-17 07:08:32 UTC [nginx][error] 87341#0: *3417928 openat() "/home/u829-qj4c2qjcwnfq/www/hospitex.com/public_html/.well-known/traffic-advice" failed (2: No such file or directory), client: 66.249.81.96, server: hospitex.com, request: "GET /.well-known/traffic-advice HTTP/1.1", host: "www.hospitex.com"

2024-04-16 05:53:25 UTC [apache][core:error] [pid 59899] (36)File name too long: [client 13.80.183.173:12136] AH00036: access to /&data=05|02|invoice@azwest.be|3bde0e48c57e498e2fa908dc5ad41da7|022b323b6cd94d45b3a57df7a0c6e60b|0|0|638485115729976632|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0=|0|||&sdata=nWqUzTCF9mt3mWYKFDOHZ8mRlNDBenhaEFlY98A1Rl4=&reserved=0 failed (filesystem path '/home/customer/www/hospitex.com/public_html/&data=05|02|invoice@azwest.be|3bde0e48c57e498e2fa908dc5ad41da7|022b323b6cd94d45b3a57df7a0c6e60b|0|0|638485115729976632|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0=|0|||&sdata=nWqUzTCF9mt3mWYKFDOHZ8mRlNDBenhaEFlY98A1Rl4=&reserved=0')

2024-04-12 09:38:45 UTC [apache][core:error] [pid 93470] (36)File name too long: [client 13.80.183.173:12136] AH00036: access to /&data=05|02|economaat.bestellingen@azwest.be|0e08b04e61ac49aad38c08dc5a3e3fb3|022b323b6cd94d45b3a57df7a0c6e60b|0|0|638484471071229248|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0=|0|||&sdata=2itPs3eRKKTwtU5LqDcEZ+Xz7j9tzVEtEqCuuXafWtw=&reserved=0 failed (filesystem path '/home/customer/www/hospitex.com/public_html/&data=05|02|economaat.bestellingen@azwest.be|0e08b04e61ac49aad38c08dc5a3e3fb3|022b323b6cd94d45b3a57df7a0c6e60b|0|0|638484471071229248|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0=|0|||&sdata=2itPs3eRKKTwtU5LqDcEZ+Xz7j9tzVEtEqCuuXafWtw=&reserved=0')

Aprile 17, 2024 a 12:02 pm #15531753

hospitexI

Va bene il file fornito sopra?

L'argomento '[Chiuso] Il sito va in down ogni volta che il vostro plugin si aggiorna' è chiuso a nuove risposte.