Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the ad-inserter domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/blog.webeats.it/httpdocs/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the cookie-law-info domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/blog.webeats.it/httpdocs/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/blog.webeats.it/httpdocs/wp-includes/functions.php on line 6114
PrestaShop 1.6.1.5 errore PDF delivery slip

Workaround per PrestaShop 1.6.1.5 sulla generazione documenti di trasporto (delivery slip) che porta il sito in error 500

L’aggiornamento di qualche giorno fa di PrestaShop che porta la versione a 1.6.1.5, porta un bug sulla generazione dei documenti di trasporto (delivery slip).

Quando cliccate sull’icona di download del documento, il server genererà un errore 500 rendendo impossibile accedere al PDF.

Fix ufficiale

come riportato sul repository ufficiale di GitHub (fix ufficiale), è necessario modificare 2 file classes/pdf/HTMLTemplate.phpclasses/pdf/HTMLTemplateInvoice.php

Nel primo file classes/pdf/HTMLTemplate.php è necessario aggiungere dopo la linea 234

public function getPagination() {
   return $this->smarty->fetch($this->getTemplate('pagination'));
}

mentre nel file classes/pdf/HTMLTemplateInvoice.php alla riga 504 è necessario rimuovere

/**		
 * Returns the template's HTML pagination block		
 *		
 * @return string HTML pagination block		
 */		
 public function getPagination()		
 {		
    return $this->smarty->fetch($this->getTemplate('pagination'));		
 }

Wordaround temporaneo e non corretto

Per risolvere questo piccolo problema è necessario modificare il file PDF.php presente in

classes/pdf/PDF.php

accedendo tramite FTP, e commentare (aggiungendo un //) la linea 95 di PDF.php

$this->pdf_renderer->createPagination($template->getPagination());

Salvate e ricaricate il file.

Questo errore è stato segnalato anche sul forum ufficiale di PrestaShop