Dolibarr / dolibarr

Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.
https://www.dolibarr.org
GNU General Public License v3.0
5.3k stars 2.74k forks source link

V17.0.0 Setup of invoices fails when lang=nb_NO #24193

Open terhoy opened 1 year ago

terhoy commented 1 year ago

Bug

Hi,

Thanks for the great work with Dolibarr, highly appreciated!

Installed a fresh version 17 of Dolibarr. When language is set to nb_NO the setup of the invoice module partly fails. Look at enclosed screen dump "Invoice setup lang=en_GB.JPG" and "Invoice setup lang=nb_NO.JPG"

The Dolibarr error_log states:

[12-Mar-2023 11:50:05 Europe/Berlin] PHP Fatal error: Uncaught ArgumentCountError: 11 arguments are required, 5 given in /home/krogevhn/public_html/dolibarr/core/class/translate.class.php:641 Stack trace:

0 /home/krogevhn/public_html/dolibarr/core/class/translate.class.php(641): sprintf()

1 /home/krogevhn/public_html/dolibarr/core/modules/facture/mod_facture_mars.php(81): Translate->trans()

2 /home/krogevhn/public_html/dolibarr/admin/facture.php(345): mod_facture_mars->info()

3 {main}

thrown in /home/krogevhn/public_html/dolibarr/core/class/translate.class.php on line 641

Invoice setup lang=en_GB Invoice setup lang=nb_NO

error_log.txt

Environment Version

17

Environment OS

Linux x86_64 3.10.0-962.3.2.lve1.5.42.el6h.x86_64

Environment Web server

Apache 2.4.55

Environment PHP

8.1

Environment Database

MySQL 5.7.40-cll-lve

Environment URL(s)

/dolibarr/admin/facture.php?save_lastsearch_values=1&backtopage=%2Fdolibarr%2Fadmin%2Fmodules.php

Expected and actual behavior

Setup page for module Invoice is only partly shown. When lang=nb_N= the "Invoices and credit notes numbering model" only show the name "Mars". When lang=en_GB the whole page is shown.

Invoice setup lang=nb_NO Invoice setup lang=en_GB

Steps to reproduce the behavior

Change Default language to "nb_NO". Go to "Moduler/Applikasjoner" and choose "Fakturaer". Click on the cogwheel to setup the module.

default language=nb_NO Fakturaoppsett

Attached files

Please find enclosed the error_log.txt and dolibarr.log dolibarr.log error_log.txt

frederic34 commented 1 year ago

with php 7.4 image

with 8.1 :

image

terhoy commented 1 year ago

with php 7.4 image

with 8.1 :

image

Thanks frederic34, confirming that changing to php version 7.4 solved this problem.

Regards

Hystepik commented 1 year ago

Hello, I think it's fixed, can you check with the last version of 17.0.3

terhoy commented 5 months ago

Thank's @Hystepik I've upgraded to version 19. This case can be closed.

terhoy commented 5 months ago

Thank's @Hystepik I've upgraded to version 19. This case can be closed.