ODS templates not updating

When I click “refresh” on 6.0.0 invoice screen, I get this:

Warning: preg_replace(): Unknown modifier ‘C’ in /home/jardes/www/dolibarr/includes/odtphp/Segment.php on line 181

Warning: preg_replace(): Unknown modifier ‘C’ in /home/jardes/www/dolibarr/includes/odtphp/Segment.php on line 181

Warning: preg_replace(): Unknown modifier ‘C’ in /home/jardes/www/dolibarr/includes/odtphp/Segment.php on line 181

Warning: Cannot modify header information - headers already sent by (output started at /home/jardes/www/dolibarr/includes/odtphp/Segment.php:181) in /home/jardes/www/dolibarr/core/actions_builddoc.inc.php on line 96

The document gets created, but it only contains invoice metadata (customer name, invoice number, due date and so on) but no rows at all!

Any help is appreciated. My invoicing has stopped for now… :unhappy:

The ODS template is attached:

MoveGO-Lasku.zip (63.2 KB)

Some further information…

It seems the documents get created despite the warnings, but all invoice lines, or order lines, are empty in the template. Same template has worked for year up until now. This is not template-related, because also the included “template_invoice.odt” does not work.

Please help.

Hello,
I have the exact same problem after update to Dolibarr 6.0 :unhappy:
Any help please?

Hi, guys, I noticed the same error on segment. php line 181,
Haven’t gone through the code details at the moment,
for temporary desperate solution, just replace segment.php file with previous working version segment.php.

Remember this is just temporary solution, until the bug is fixed.

Please try with this file.

Sorry. The file was not the right type and was not included. Here you have the Segment file that fix the error.

Pièces jointes :