delcroip / dolibarr_project_timesheet

Timesheet view for project in Dolibarr
https://demo-timesheet.pmpd.eu
GNU Affero General Public License v3.0
36 stars 32 forks source link

error with dolibarr v20.0.2 and 5.0.2 #261

Open funsurfer2008 opened 1 month ago

funsurfer2008 commented 1 month ago

If i want to create a Task or edit a existing one i'll get the following Error:

Error in request SELECT rowid as rowid, ref, label FROM llx_product AND Filter error - Bad syntax of the search string ORDER BY ref, label You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND Filter error - Bad syntax of the search string ORDER BY ref, label' at line 1. Check setup of extra parameters.

also there is an error with the "includeMain.lib.php"

this should be right: // Define status

$res = 0; error_reporting(E_ALL); $currentTimesheetPath = dirname(FILE); if (! $res && file_exists($currentTimesheetPath."/dev.inc.php")) { include $currentTimesheetPath.'/dev.inc.php'; } //if (! $res && ! empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; if (! $res && file_exists($currentTimesheetPath."/../../../main.inc.php")) { $res = @include $currentTimesheetPath.'/../../../main.inc.php';// in HTdocs //$_SERVER["CONTEXT_DOCUMENT_ROOT"] = realpath($currentTimesheetPath."/../../../"); } if (! $res && file_exists($currentTimesheetPath."/../../../../main.inc.php")) { $res = @include $currentTimesheetPath.'/../../../../main.inc.php';//in custom //$_SERVER["CONTEXT_DOCUMENT_ROOT"] = realpath($currentTimesheetPath."/../../../../"); } if (! $res && file_exists($currentTimesheetPath."/../../../../../main.inc.php")) { $res = @include $currentTimesheetPath.'/../../../../../main.inc.php';//in custom //$_SERVER["CONTEXT_DOCUMENT_ROOT"] = realpath($currentTimesheetPath."/../../"); } if (! $res) die("Include of main fails") ;

if ($user->admin && version_compare("4.3.10", $conf->global->TIMESHEET_VERSION) > 0){ setEventMessage("Version of timesheet updated, please deactivate then reactivate the module", 'warnings'); } // return from functions define("BADPARAM",-2); define("OK",1); define("NOK",-1); define("NOTCREATED",-3); define("NOTUPDATED",-4); define("CHILDNOTCREATED",-5);

funsurfer2008 commented 1 month ago

@tronx2100 maybe you have an short fix.

brgds

tronx2100 commented 1 month ago

so what i know this is a BUG in dolibarr because there is a BUG in extrafields. Which wrong interpret the sql request. Also when i change the sql syntax the error occours everytime. should be related to this. https://github.com/Dolibarr/dolibarr/issues/31028 . The error is related to the extraoptions fields in dolibarr which have sql connection in user and so... when you remove the extrafield the error is gone for now , the shortest fix ...

funsurfer2008 commented 2 weeks ago

Hy, did not work even in 20.0.2. we need this field in User and Projects. do you know when it will be fixed?

brgds

funsurfer2008 commented 2 weeks ago

i cahnged the filter from: product:ref|label:rowid::tosell='1' AND fk_product_type='1' to product:ref|label:rowid::(tosell:=:1 AND fk_product_type:=:1) now it work. but is this the final fix? brgds

tronx2100 commented 2 weeks ago

i don't know some other modules are affected too ... Is a Bug in the core...Am 13.11.2024 um 19:54 schrieb funsurfer2008 @.***>: i cahnged the filter from: product:ref|label:rowid::tosell='1' AND fk_product_type='1' to product:ref|label:rowid::(tosell:=:1 AND fk_product_type:=:1) now it work. but is this the final fix? brgds

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>