From 8f1c8b74063f6d4658d7ec98d6192f3986302893 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 2 Sep 2024 18:22:55 +0200 Subject: [PATCH 1/4] Debug v20: error/warning when using disabled fields coming from profile --- htdocs/exports/export.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index f83522693d4..594ed3b4827 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -960,6 +960,10 @@ if ($step == 4 && $datatoexport) { print ''; foreach ($array_selected as $code => $value) { + if (!isset($objexport->array_export_fields[0][$code])) { // For example when field was in predefined filter but not more active (localtax1 disabled by setup of country) + continue; + } + print ''; $entity = (!empty($objexport->array_export_entities[0][$code]) ? $objexport->array_export_entities[0][$code] : $objexport->array_export_icon[0]); @@ -1193,8 +1197,10 @@ if ($step == 5 && $datatoexport) { print ''.$langs->trans("ExportedFields").''; $list = ''; foreach ($array_selected as $code => $label) { - $list .= (!empty($list) ? ', ' : ''); - $list .= $langs->trans($objexport->array_export_fields[0][$code]); + if (isset($objexport->array_export_fields[0][$code])) { + $list .= (!empty($list) ? ', ' : ''); + $list .= $langs->trans($objexport->array_export_fields[0][$code]); + } } print ''.$list.''; From 544020c32cf8efc00aca6767e5691df0a2a37692 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 2 Sep 2024 22:39:42 +0200 Subject: [PATCH 2/4] Debug v20 --- htdocs/admin/system/security.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/admin/system/security.php b/htdocs/admin/system/security.php index fbf0cada6fd..8e1c16581c3 100644 --- a/htdocs/admin/system/security.php +++ b/htdocs/admin/system/security.php @@ -292,6 +292,8 @@ if (file_exists($installlock)) { } else { print img_warning().' '.$langs->trans("WarningLockFileDoesNotExists", DOL_DATA_ROOT); } + +print '
'; print '
'; // Is upgrade unlocked @@ -300,6 +302,7 @@ if (file_exists($installlock)) { // If install not locked, no need to show this. print ''.$langs->trans("DolibarrUpgrade").': '; print img_warning().' '.$langs->trans("WarningUpgradeHasBeenUnlocked", $upgradeunlock); print '
'; + print '
'; } } From 306def7aab6dcd2db98d628241570dde1320253c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 2 Sep 2024 22:46:14 +0200 Subject: [PATCH 3/4] Debug v20 look and feel v20 --- htdocs/admin/system/phpinfo.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php index 5972894065e..f54dfd74521 100644 --- a/htdocs/admin/system/phpinfo.php +++ b/htdocs/admin/system/phpinfo.php @@ -105,37 +105,37 @@ $arrayphpminversionerror = array(5, 5, 0); $arrayphpminversionwarning = array(5, 6, 0); if (versioncompare(versionphparray(), $arrayphpminversionerror) < 0) { - print 'Error '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionerror)); + print img_picto('Error', 'error').' '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionerror)); } elseif (versioncompare(versionphparray(), $arrayphpminversionwarning) < 0) { - print 'Warning '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionwarning)); + print img_picto('Warning', 'warning').' '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionwarning)); } else { - print 'Ok '.versiontostring(versionphparray()); + print img_picto('Ok', 'tick').' '.versiontostring(versionphparray()); } print ''; print 'GET and POST support'; if (!isset($_GET["testget"]) && !isset($_POST["testpost"]) && !isset($_GET["mainmenu"])) { // We must keep $_GET and $_POST here. This is a specific test. - print 'Warning '.$langs->trans("PHPSupportPOSTGETKo"); + print img_picto('Warning', 'warning').' '.$langs->trans("PHPSupportPOSTGETKo"); print ' ('.$langs->trans("Recheck").')'; } else { - print 'Ok '.$langs->trans("PHPSupportPOSTGETOk"); + print img_picto('Ok', 'tick').' '.$langs->trans("PHPSupportPOSTGETOk"); } print ''; print 'Sessions support'; if (!function_exists("session_id")) { - print 'Error '.$langs->trans("ErrorPHPDoesNotSupportSessions"); + print img_picto('Error', 'error').' '.$langs->trans("ErrorPHPDoesNotSupportSessions"); } else { - print 'Ok '.$langs->trans("PHPSupportSessions"); + print img_picto('Ok', 'tick').' '.$langs->trans("PHPSupportSessions"); } print ''; print 'UTF-8 support'; if (!function_exists("utf8_encode")) { - print 'Warning '.$langs->trans("ErrorPHPDoesNotSupport", "UTF8"); + print img_picto('Warning', 'warning').' '.$langs->trans("ErrorPHPDoesNotSupport", "UTF8"); } else { - print 'Ok '.$langs->trans("PHPSupport", "UTF8"); + print img_picto('Ok', 'tick').' '.$langs->trans("PHPSupport", "UTF8"); } print ''; From ec3dcc9565aa832ed0a5439119780d13f68cea7c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 3 Sep 2024 01:54:10 +0200 Subject: [PATCH 4/4] Debug v20 Fix regression --- htdocs/categories/class/categorie.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index b14f8c998b7..330baf65469 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1239,7 +1239,8 @@ class Categorie extends CommonObject } dol_syslog(get_class($this)."::get_full_arbo dol_sort_array", LOG_DEBUG); - $this->cats = dol_sort_array($this->cats, 'fulllabel', 'asc', true, false); + + $this->cats = dol_sort_array($this->cats, 'fulllabel', 'asc', 1, 0, 1); // Sort on full label like "Label 1 >> Sublabel a >> Subsublabel" return $this->cats; }